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

#### Andrew Skibbz

##### New Member
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.

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
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
hi

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

#### Dave Patton

##### Well-known Member
Date and Time.xlsm
CD
225-Sep-21 15:0226-Sep-21 07:00
325-Sep-21 06:0025-Sep-21 06:00
4
22e
Cell Formulas
RangeFormula
D2:D3D2=IF(MOD(C2,1)>0.625,INT(C2)+1.291667,C2)

Replies
2
Views
407
Replies
3
Views
41
Replies
5
Views
102
Replies
1
Views
241
Replies
3
Views
149

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.

### Which adblocker are you using?

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

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