The SEQUENCE function can be used to generate numeric sequences of all kinds.
Since Excel times are just numbers, SEQUENCE works well for generating times.
In the first worksheet, let’s generate 9 times, one hour apart, starting at 9:00 AM.
ForstartI’ll use 9:00 AM.
Fortimes, I use 9.
And forstepI use 1 hour.
In cell E5, I’ll set up the SEQUENCE function to use these values.
Rowsis the Times value in C5.
Startis 9:00 AM from cell C4.
Andstepis 1 hour, from C6.
If I adjust any of the inputs, SEQUENCE outputs a new set of times.
If you see numbers like this when you expect to see times, verify toapply time formatting.
C4 and C5 contain Start and End times.
Cell C6 contains the Step value, which is currently set at 30 minutes.
In cell C7, we need to enter a formula to calculate the number of times.
This is the End time minus the Start time, divided by the Step time.
With current values, this returns 21.
Now in cell E5, I’ll enter the SEQUENCE function.
Rowsis the Times value in C7.
Startis 8:00 AM from cell C4.
Andstepis 30 minutes from cell C6.
When I enter the formula, we get a list of 21 times.
you’ve got the option to also use theTIME functionto embed times, as seen in cell D5.