Advance date after midnight

l1011driver

Board Regular
Joined
Dec 26, 2014
Messages
68
Office Version
  1. 365
Platform
  1. Windows
Thank you in advance to anyone who might have a suggestion.

I have a spreadsheet that has time in 1 minute increments. In an adjacent column I have a date corresponding to each 1-minute increment of time.

What I would like to do is have the date cell advance to the next day when the corresponding time cell reaches midnight (00:00). Subsequent date cells would reflect the "new" date until again reaching midnight on that day.

If you have any suggestions or help I'd be grateful. It seems my laptop doesn't like XL2BB so I'll attach a screen shot of what I'm talking about. I use a formula for time in column C, but column B is just the date copied to each subsequent cell. The formula bar shows the formula I use for the 1-minute increments of time.

Thank you for any help.

Sincerely,

L1011driver
 

Attachments

  • Screenshot (25).png
    Screenshot (25).png
    80.8 KB · Views: 17

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
In that case you need to clear all the cells below the formula.
I have to be doing something wrong. When I clear all the cells below the formula the first 15 or so cells remain and and I can neither clear the cell nor delete the cells.

If I drag the formula below those 15 or so cells I get the spill message again.

Sorry I'm not more proficient at this. I apologize.
 
Upvote 0
If I drag the formula below those 15 or so cells I get the spill message again.
Do not drag the formula down.
When I clear all the cells below the formula the first 15 or so cells remain
That's because the formula is spilling down 15 cells, you can change how many rows it spills by changing the 15 inside the sequence function.
 
Upvote 0
Do not drag the formula down.

That's because the formula is spilling down 15 cells, you can change how many rows it spills by changing the 15 inside the sequence function.
Light bulb just came on.

Ok, I put the correct number of cells in. No SPILL error. I did not drag the formula. The date column cells filled up just fine, but when the date reaches the time of "00:00:00" in the adjacent cell the date does not advance.
 
Upvote 0
The formulas I posted do not cause spill situations.
You would just copy paste the formulas from B7:C7 down as far you want/need.
 
Upvote 0
My effort:
Book1
BC
4Start Date:18/05/2023
5Start Time:23:50
6Minutes to run:20
7
8DateTime
918/05/202323:51:00
1018/05/202323:52:00
1118/05/202323:53:00
1218/05/202323:54:00
1318/05/202323:55:00
1418/05/202323:56:00
1518/05/202323:57:00
1618/05/202323:58:00
1718/05/202323:59:00
1819/05/202300:00:00
1919/05/202300:01:00
2019/05/202300:02:00
2119/05/202300:03:00
2219/05/202300:04:00
2319/05/202300:05:00
2419/05/202300:06:00
2519/05/202300:07:00
2619/05/202300:08:00
2719/05/202300:09:00
2819/05/202300:10:00
Sheet1
Cell Formulas
RangeFormula
B9:C28B9=LET( t,C5+TIME(0,SEQUENCE(C6),0), d,SCAN(C4,t,LAMBDA(a,x,IF(x=1,a+1,a))), HSTACK(d,t))
Dynamic array formulas.
Hey George,

Your example works exactly like I'm wanting it to, but when I plug your formula into my spreadsheet I get the SPILL message again. I clear all the cells below it, but the SPILL message appears in the cell in which I enter your formula.
 
Upvote 0
It works for me with that number of rows.
Fluff.xlsm
ABC
1
2
3
418/05/2023
523:50
6
718/05/202323:51:00
818/05/202323:52:00
918/05/202323:53:00
1018/05/202323:54:00
1118/05/202323:55:00
1218/05/202323:56:00
1318/05/202323:57:00
1418/05/202323:58:00
1518/05/202323:59:00
1619/05/202300:00:00
1719/05/202300:01:00
53019/05/202308:34:00
53119/05/202308:35:00
Sheet4
Cell Formulas
RangeFormula
B7:B531B7=INT(C4+C5+TIME(0,SEQUENCE(525),0))
C7:C531C7=C5+TIME(0,SEQUENCE(525),0)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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