add missing hours in hourly data

ijqureshi

New Member
Joined
May 18, 2008
Messages
25
Hi

I need to add missing hours in 24 hourly data with the help of vba to keep my dynamic charts free from errors

Sample Interval :

06.19.2011 00:00:00
06.19.2011 01:00:00
06.19.2011 02:00:00
06.19.2011 03:00:00
06.19.2011 04:00:00
06.19.2011 05:00:00
06.19.2011 07:00:00
06.19.2011 08:00:00
06.19.2011 09:00:00
06.19.2011 10:00:00
06.19.2011 11:00:00
06.19.2011 12:00:00
06.19.2011 13:00:00
06.19.2011 14:00:00
06.19.2011 15:00:00
06.19.2011 16:00:00
06.19.2011 17:00:00
06.19.2011 18:00:00
06.19.2011 19:00:00
06.19.2011 20:00:00
06.19.2011 21:00:00
06.19.2011 22:00:00
06.19.2011 23:00:00

Sample with missing interval

06.19.2011 00:00:00
06.19.2011 01:00:00
06.19.2011 02:00:00
06.19.2011 03:00:00
06.19.2011 04:00:00
06.19.2011 05:00:00
06.19.2011 07:00:00
06.19.2011 08:00:00
06.19.2011 09:00:00
06.19.2011 10:00:00
06.19.2011 20:00:00
06.19.2011 21:00:00
06.19.2011 22:00:00
06.19.2011 23:00:00

i want all the missing hours to inserted by vba

plz help
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Quick questions is the 06:00:00 supposed to be missing, is there other data on the sheet that needs to stay aligned with the time intervals and what cell does the time interval start in? Also please provide any other details that might be relevant.

Thanks
 
Upvote 0
Hi ralajer

missing hours means no data ! in that interval just add missing hour

with blank data

for example if we have 3 hours in 4 hours it will add missing hour

20:00
21:00
23:00
00:00

case:

20:00
23:00
00:00


it should add 21:00 , 22:00 column is A

Thanks for your support :D
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,345
Members
452,907
Latest member
Roland Deschain

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