How to transfer data from horizonal to vertical

fvisions

Board Regular
Joined
Jul 29, 2008
Messages
191
Office Version
  1. 365
Platform
  1. Windows
How can I create a vba to copy the data from col c to columns F:AC for multiple days with cell e1 to be Oct 1st ed to be Oct 2 and so on for a full month?
Example of the data set is below: columns A:C is the month of October for 24 hours
10/01/2020​
12:00:00​
0.211​
10/01/2020​
0.211​
0.25​
0.35​
10/01/2020​
1:00:00​
0.25​
10/02/2020​
10/01/2020​
2:00:00​
0.35​
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Using Power Query, Pivoted the data
Book7
ABCDEFGH
1DateTime Value
210/01/202012:00:000.21110/01/20200.2110.250.35
310/01/20201:00:000.2510/02/2020
410/01/20202:00:000.35
5
6Date12:00:001:00:002:00:00
710/01/20200.2110.250.35
Sheet1


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[#"Time "]), "Time ", "Value")
in
    #"Pivoted Column"
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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