In this video, we'll look at how to generate a sequence of dates with the SEQUENCE function.
The SEQUENCE function can be used to generate numeric sequences of all kinds. Since Excel dates are just numbers, SEQUENCE works well for generating dates.
In this first worksheet, we have a couple cells set up to collect input for a start date, and days.
I'll enter the SEQUENCE function in cell E5 and configure it to use these inputs.
The rows argument corresponds to the number of dates we want, so we want to use C5.
For columns, we want 1.
For start, we pick up the value in C4.
Finally, for step, I'll enter 1, since we these dates to be consecutive.
When I enter the formula, we get a list of 7 dates starting on May 1.
If I adjust either the start date or days, the SEQUENCE function immediately returns a new list of dates.
One thing I want to mention is that I've already formatted cells in column E as dates.
However, if I apply general number formatting, you can see the large serial numbers that represent dates in Excel. If you see numbers like this when you expect to see dates, you need to apply date formatting.
On the next worksheet, let's use SEQUENCE to generate a list of all dates in a given month.
The Excel EOMONTH function returns the last day of the month, n months in the past or future. You can use EDATE to calculate expiration dates, due dates, and other dates that need to land on the last day of a month. Use a positive value for...