Merge year, day and hour columns in a pivot table.

mickoshea

New Member
Joined
Sep 12, 2018
Messages
1
Hi,
Just wondering can someone help or point me in the right direction for this problem.

I need to create hourly data from minute by minute data. I have a file with 2 columns, 1st the date and time (dd/mm/yy hh:mm) the 2nd is a number.

I've used a pivot table, and grouped the data by year, month, day and hour, which is almost what i need. The last part of the problem is getting this information back into 2 columns, I need to merge the year, month, day and hour columns into 1.

This is a sample of the minute by minute data before using the pivot table.[TABLE="width: 215"]
<tbody>[TR]
[TD="align: center"]DateTime[/TD]
[TD="align: center"]Variable[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:00[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:01[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]01/09/2017 00:02[/TD]
[TD="align: center"]10[/TD]
[/TR]
</tbody>[/TABLE]

When I pivot this data and group the data by year, month, day and hour I get the following:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Month[/TD]
[TD]Day[/TD]
[TD]Hour[/TD]
[TD]Variable[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]Sep[/TD]
[TD]01-Sep[/TD]
[TD]00[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]

What I need to do is get this format back into 2 columns like the data I started with.

Any help really appreciated.

Mick
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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