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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
2,398
Office Version
  1. 2013
Platform
  1. Windows
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"))
 

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
1,925
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
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
 

Forum statistics

Threads
1,147,451
Messages
5,741,191
Members
423,647
Latest member
lyanndominique

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
Top