Forum Discussion
Excel drop down lists
The data validation won't accept a dynamic array but you can refer to a spill in the sheet containing the dates.
This formula produces an array of 30 dates starting from today:
=SEQUENCE(30,,TODAY())
Place it somewhere in the sheet. Then in data validation, refer to the spill:
- Chanda1625Aug 24, 2023Copper ContributorI actually need the sequence as a drop down that the user can choose one of the dates from to automatically fill in the cell. I would like it to drop down a list of 30 dates from today forward that can be chosen. If that isn't possible, is there a way to have a calendar pop-up to choose a date from?
- Chanda1625Aug 18, 2023Copper ContributorThank you very much for your help! I am still a bit confused what goes in the parenthesis after SEQUENCE. Let's say I want today's date to auto-fill in cell A1. Then in C1 I want the drop down that lists 30 days sequentially from today's date. How does that formula look EXACTLY for putting in the data validation.
I am getting stuck on what the last entry is supposed to be. I think it should look like : =SEQUENCE(30, right here should be column, then this should be the word TODAY for start, then here it is asking for step)
What does it want for column? Location, quantity, or what? Also, what is step that it is asking for? Commas between everything? My brain feels like it is going to explode. lol- Patrick2788Aug 19, 2023Silver Contributor
You can use function arguments to aid in construction of the formula.
If you enter =SEQUENCE( then press Shift+F3 (or click the Fx button) then you'll get this menu:
- Chanda1625Aug 24, 2023Copper Contributor
- SnowMan55Aug 19, 2023Bronze Contributor
Chanda1625 Sometimes Microsoft's documentation is not up to the task, as with the SEQUENCE function. I recommend checking another source, such as this Ablebits article., that gives more information; that article is explicit in identifying the columns and step arguments as optional quantities, each with a default of 1.
Yes, you need to use a comma between each argument. And note that TODAY is not (just a) word, it is the name of a function, and function names are followed by an open parenthesis, etc.
So these formulas are equivalent:
=SEQUENCE(30,,TODAY()) =SEQUENCE(30,1,TODAY()) =SEQUENCE(30,1,TODAY(),1) =SEQUENCE(30,,TODAY(),1)- Chanda1625Aug 24, 2023Copper Contributor
I actually need the sequence as a drop down that the user can choose one of the dates from to automatically fill in the cell. I would like it to drop down a list of 30 dates from today forward that can be chosen. If that isn't possible, is there a way to have a calendar pop-up to choose a date from?
- peiyezhuAug 19, 2023Bronze Contributorright here should be column,
what kind of columns ?
here as source of validation,I guess only require 1 column rather than multiple columns.
Do you need pick one data and fill several columns (e.g. Location quantity) at once?
I guess you can use xlookup formula to fill other column instead.- Chanda1625Aug 24, 2023Copper Contributor
I actually need the sequence as a drop down that the user can choose one of the dates from to automatically fill in the cell. I would like it to drop down a list of 30 dates from today forward that can be chosen. If that isn't possible, is there a way to have a calendar pop-up to choose a date from?