OzGrid

How to move monthly data in columns to rows

< Back to Search results

 Category: [Excel]  Demo Available 

How to move monthly data in columns to rows

 

Requirement:

 

The user needs to create a standard excel file that will allow users to take their monthly budgets that appear in columns and convert this to data that appears in rows (it's a load file for an in house software).

This is what the data currently would look like:

Project $ Type Resource 01-01-2018 02-01-2018 03-01-2018
500 Operating EXTSVC 500.00 550.00 605.00
600 Capital INTL 1000.00 1100.00 1210.00
700 Capital EXTSVC 1500.00 1650.00 1815.00
800 Capital INTL 2000.00 2200.00 2420.00
900 Capital EXTSVC 2500.00 2750.00 3025.00
900 Operating EXTSVC 3000.00 3300.00 3630.00


This what the data needs to look like:

Project $ Type Resource Date Amount
500 Operating EXTSVC 01-01-2018 500.00
500 Operating EXTSVC 02-01-2018 550.00
500 Operating EXTSVC 03-01-2018 605.00
600 Capital INTL 01-01-2018 1000.00
600 Capital INTL 02-01-2018 1100.00
600 Capital INTL 03-01-2018 1210.00
700 Capital EXTSVC 01-01-2018 1500.00
700 Capital EXTSVC 02-01-2018 1650.00
700 Capital EXTSVC 03-01-2018 1815.00
800 Capital INTL 01-01-2018 2000.00
800 Capital INTL 02-01-2018 2200.00
800 Capital INTL 03-01-2018 2420.00
900 Capital EXTSVC 01-01-2018 2500.00
900 Capital EXTSVC 02-01-2018 2750.00
900 Capital EXTSVC 03-01-2018 3025.00
900 Operating EXTSVC 01-01-2018 3000.00
900 Operating EXTSVC 02-01-2018 3300.00
900 Operating EXTSVC 03-01-2018 3630.00

 

Is there are any easy way to accomplish this?

 

https://www.ozgrid.com/forum/forum/help-forums/excel-vba-macros/1211615-monthly-data-in-columns-needs-to-be-moved-to-rows

 

Solution:

 

Code:

Solution provided by graha_karya.

 

See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets

 

See also:

How to data flip months
How to use VBA code to hide row based on month
How to use VBA code to obtain date from cell, then calculate 3 months later
How to count weekdays in a month excluding holidays

 

Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


Gallery



stars (0 Reviews)