Time and date sequencing together.

Avalanchez

New Member
Joined
Jun 23, 2021
Messages
14
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Platform
  1. Windows
Hello,

I am trying to figure out the best way to create a time and date sequence that work together. I can get the time to work correctly with the sequence formula but Im not sure how to incorporate the date. Im trying to have one cell have date (B1) and the next the time (C1), when the rest of the rows below those see that date and time I want a 6 hour sequence to follow for the next 13 rows. Can this be done by formula or would VBA be easier?
EX:
Start Times2/20/202312:00
6 hr2/20/202318:00
12 hr2/21/202300:00
18 hr2/21/202306:00
24 hr
30 hr
36 hr
42 hr
48 hr
54 hr
60 hr
66 hr
72 hr
End
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How about
Fluff.xlsm
ABC
1Start Times20/02/202312:00:00
220/02/202318:00:00
321/02/202300:00:00
421/02/202306:00:00
521/02/202312:00:00
621/02/202318:00:00
722/02/202300:00:00
822/02/202306:00:00
922/02/202312:00:00
1022/02/202318:00:00
1123/02/202300:00:00
1223/02/202306:00:00
1323/02/202312:00:00
1423/02/202318:00:00
15
Summary
Cell Formulas
RangeFormula
B2:C14B2=LET(a,SEQUENCE(13,,B1+C1+TIME(6,0,0),TIME(6,0,0)),HSTACK(INT(a),MOD(a,1)))
Dynamic array formulas.
 
Upvote 0
Solution
How about
Fluff.xlsm
ABC
1Start Times20/02/202312:00:00
220/02/202318:00:00
321/02/202300:00:00
421/02/202306:00:00
521/02/202312:00:00
621/02/202318:00:00
722/02/202300:00:00
822/02/202306:00:00
922/02/202312:00:00
1022/02/202318:00:00
1123/02/202300:00:00
1223/02/202306:00:00
1323/02/202312:00:00
1423/02/202318:00:00
15
Summary
Cell Formulas
RangeFormula
B2:C14B2=LET(a,SEQUENCE(13,,B1+C1+TIME(6,0,0),TIME(6,0,0)),HSTACK(INT(a),MOD(a,1)))
Dynamic array formulas.
I think that'll work thank you very much.
 
Upvote 0
How about
Fluff.xlsm
ABC
1Start Times20/02/202312:00:00
220/02/202318:00:00
321/02/202300:00:00
421/02/202306:00:00
521/02/202312:00:00
621/02/202318:00:00
722/02/202300:00:00
822/02/202306:00:00
922/02/202312:00:00
1022/02/202318:00:00
1123/02/202300:00:00
1223/02/202306:00:00
1323/02/202312:00:00
1423/02/202318:00:00
15
Summary
Cell Formulas
RangeFormula
B2:C14B2=LET(a,SEQUENCE(13,,B1+C1+TIME(6,0,0),TIME(6,0,0)),HSTACK(INT(a),MOD(a,1)))
Dynamic array formulas.
One last thing, If those top two cells are blank, can it keep the rest of the cells blank until entered?
 
Upvote 0
How about
Excel Formula:
=LET(a,SEQUENCE(13,,B1+C1+TIME(6,0,0),TIME(6,0,0)),IF(OR(B1="",C1=""),"",HSTACK(INT(a),MOD(a,1))))
 
Upvote 1

Forum statistics

Threads
1,215,663
Messages
6,126,097
Members
449,291
Latest member
atfoley16

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