if Date and Time > 15:00 Then move to 07:00 the following day

Andrew Skibbz

New Member
Joined
Mar 29, 2017
Messages
28
Hi All,

I would like help with a formula that would move a date and time stamp to the following day at 07:00 if the date and timestamp was past 15:00.

So for instance if the date and time was 25/09/21 15:02 the new timestamp would be 26/09/21 07:00

If the timestamp is less than 15:00 then it just stays the same date.

Thanks in advance,

Best,

Skibbz
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Assuming your date & time are in cell A1, try this formula

Excel Formula:
=IF(A1<(INT(A1)+TIMEVALUE("15:00:00")),INT(A1)+TIMEVALUE("15:00:00"),INT(A1)+1+TIMEVALUE("07:00:00"))
 
Upvote 0
hi

testing your formula GWteB

would it not be

=IF(A1<(INT(A1)+TIMEVALUE("15:00:00")),A1,INT(A1)+1+TIMEVALUE("07:00:00"))

As everything was to stay the same if time was before 15:00
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

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