How do I formulate date change at midnight?

primedb

New Member
Joined
Apr 6, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
1649266918760.png
I would like a formula in column A that recognizes midnight and advance the day. I only want this to happen at midnight as shown. The yellow cells are hard keyed. Column B is a simple formula =B3+1/24. I need to be able to change the date A3 and the time B3 and have it automatically update the rest of the sheet.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
It works for one day. I need it to span 2 to 3 days. Thanks.
 
Upvote 0
Sunday, June 5, 2022
14:00​
15:00​
16:00​
17:00​
18:00​
19:00​
20:00​
21:00​
22:00​
23:00​
Monday, June 6, 2022
0:00​
1:00​
2:00​
3:00​
4:00​
5:00​
6:00​
7:00​
8:00​
9:00​
10:00​
11:00​
12:00​
13:00​
14:00​
15:00​
16:00​
17:00​
18:00​
19:00​
20:00​
21:00​
22:00​
23:00​
0:00​
It is not capturing the second date change.
 
Upvote 0
Ok,

Try this:

Cell Formulas
RangeFormula
B50:B60,B27:B48,B4:B25B4=B3+1/24
A4:A60A4=IF(MOD(ROUND(B4,2),1)=0,MAX(A$3:A3)+1,"")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,444
Messages
6,124,891
Members
449,194
Latest member
JayEggleton

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