Transposing Data

StewartS

Board Regular
Joined
Feb 24, 2002
Messages
217
We have a number of worbooks that have the following column lables

Cost Centre Expenditure code April May June etc
AAA 100 10 20 30

A number of times it is necessary to convert it to a format

Cost Centre Expenditure Code Month Value
AAA 100 April 10
AAA 100 May 20 etc

At present I tend to do a copy and paste if there aren't too many but at other times there can be large volumes of data. I am open to pointers for an easy way to put this into a macro. At present I'm just not sure where to start this so would like some tips rather than a complete way of doing it.

Thanks

Stewart
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If you insert a column between Expenditure code and the months, and make a single entry for Cost Centre & Expenditure Code, with a separator to enable splitting them again afterwards ( like =A2&"!"&B2 ), then use that as the first column of data in this method of Normalizing data:

http://www.tek-tips.com/faqs.cfm?fid=5287
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top