Transpose data

ccollett

New Member
Joined
Sep 13, 2011
Messages
2
I have a data file made up of 3 columns, 17520 rows consisting of date, half hour increments of time and a value against each half hour (this is for a years worth of data)
I need the data to be in 365 rows (one for each day) and 48 columns (one for each half hour of the day)
Is there a function in excel to transpose / sort the data into this format?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to MrExcel board...

post a small sample of you current data layout and the way you expect the results
 
Upvote 0
Hi-

My code assumes that you have no column headers and that your data starts in A1 and ends at C17520.

This will paste your values in Column C in the range E1:AZ365

Regards, Marc


Sub TRON()

a = 1
For i = 1 To 365

Range(Cells(a, 3), Cells(a + 48, 3)).Copy

Range("E" & i).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
a = a + 48
Next i
End Sub
 
Upvote 0
Thanks for this, must of had a senior moment as i tried a pivot table and got the info out in the required format.
Regards
C
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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