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: 15

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
How about
Fluff.xlsm
ABC
1
2
3
418/05/2023
523:50
6
718/05/202323:51
818/05/202323:52
918/05/202323:53
1018/05/202323:54
1118/05/202323:55
1218/05/202323:56
1318/05/202323:57
1418/05/202323:58
1518/05/202323:59
1619/05/202300:00
1719/05/202300:01
1819/05/202300:02
1919/05/202300:03
2019/05/202300:04
2119/05/202300:05
22
Sheet4
Cell Formulas
RangeFormula
B7:B21B7=C4+C5+TIME(0,SEQUENCE(15),0)
C7:C21C7=C5+TIME(0,SEQUENCE(15),0)
Dynamic array formulas.
 
Upvote 0
Try adding these formulas to cells B7 and C7 and copying down:

B7:
Excel Formula:
=IF(ROW()=7,$C$4,IF(INT(C7)=INT(C6),B6,B6+1))

C7:
Excel Formula:
=IF(ROW()=7,C5+(1/1440),C6+(1/1440))
 
Upvote 0
If you want col B to have just the date you could use
Excel Formula:
=INT(C4+C5+TIME(0,SEQUENCE(15),0))
 
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.
 
Upvote 0
How about
Fluff.xlsm
ABC
1
2
3
418/05/2023
523:50
6
718/05/202323:51
818/05/202323:52
918/05/202323:53
1018/05/202323:54
1118/05/202323:55
1218/05/202323:56
1318/05/202323:57
1418/05/202323:58
1518/05/202323:59
1619/05/202300:00
1719/05/202300:01
1819/05/202300:02
1919/05/202300:03
2019/05/202300:04
2119/05/202300:05
22
Sheet4
Cell Formulas
RangeFormula
B7:B21B7=C4+C5+TIME(0,SEQUENCE(15),0)
C7:C21C7=C5+TIME(0,SEQUENCE(15),0)
Dynamic array formulas.
When I do this I get an error that says "#SPILL!".
 
Upvote 0
In that case you need to clear all the cells below the formula.
 
Upvote 0
Try adding these formulas to cells B7 and C7 and copying down:

B7:
Excel Formula:
=IF(ROW()=7,$C$4,IF(INT(C7)=INT(C6),B6,B6+1))

C7:
Excel Formula:
=IF(ROW()=7,C5+(1/1440),C6+(1/1440))
Similar to a previous suggestion, I get an error that says, "#SPILL!".
 
Upvote 0
Similar to a previous suggestion, I get an error that says, "#SPILL!".
My formula does not create a spill situation.
Sounds like you have other existing formulas on your sheet interfering with it.
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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