Macro to insert rows based on Date and Time Cell

Foxvh

New Member
Joined
Jul 9, 2020
Messages
14
Office Version
  1. 2010
Platform
  1. Windows
Hi,

i have a report which inputs rows of data into a (To Be Allocated) sheet and would like to have these sorted by Date and Time Allocated using a macro that places them below a merged row with the date as the header based on Date Cell (A:A) and then sorts the rows underneath the date header by time (E:E).

columns
Date (A:A)
Time (E:E)

any help or guidance would be much appreciated.

Thanks
 
Thanks that works great for inserting the date rows.
Sorry i meant a macro that will cut and insert the rows with data from To Be Allocated to the Schedule sheet, using the A:A column as the criteria of if it gets inserted and where it gets inserted.

so if A:A in To Be Allocated is blank skip, if A:A > 0 (8-JUL) then insert row to Schedule under the merged row (8-JUL) in Schedule.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Thanks that works great for inserting the date rows.
Sorry i meant a macro that will cut and insert the rows with data from To Be Allocated to the Schedule sheet, using the A:A column as the criteria of if it gets inserted and where it gets inserted.

so if A:A in To Be Allocated is blank skip, if A:A > 0 (8-JUL) then insert row to Schedule under the merged row (8-JUL) in Schedule.
Sorry, I don't understand what you need.

This is your image with the result that you want, the image is blank, I do not see that you want data in the result image.

1595013254727.png
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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