Forum Discussion
Trying to use IFS formula to create a Data Validation field
- Oct 09, 2021So I discovered something that I'm leaving here in case anyone else has the same problem.
The issue wasn't the IFS statement but that I was trying to use it in the Source field in Data Validation. Apparently that field can only hold 256 characters. I tried to short the names of the tab and the lists but it wasn't enough. I played around with it all a bit more and realized that I can name Formulas. So, I created my entire IFS statement as a FORMULA, named that, and then in the data validation, just called to the formula. It works, I was able to use full names and didn't have to shorten anything.
The issue wasn't the IFS statement but that I was trying to use it in the Source field in Data Validation. Apparently that field can only hold 256 characters. I tried to short the names of the tab and the lists but it wasn't enough. I played around with it all a bit more and realized that I can name Formulas. So, I created my entire IFS statement as a FORMULA, named that, and then in the data validation, just called to the formula. It works, I was able to use full names and didn't have to shorten anything.
- mathetesOct 09, 2021Gold Contributor
If you have the newest version of Excel, with the ability to do Dynamic Array functions, here's another approach to having a secondary drop down list, with members dependent on the first. It's a sample I created as a demonstration....pick a first name, and you'll see that the list of potential last names changes. You can extend the table in columns A and B to see how the lists can grow indefinitely.
'
- AC1-2_1Dec 13, 2021Copper Contributor
Thanks. This does work, however what about if you have a table and not just a first name field and a last name field.
For example, I have a table that each line is different and the second list should be dependent on the first list selection, for each line. Each line may have a different choice for the first list selection. Basically, I have a category list as list 1 and a sub category list as list 2 that is dependent on list 1 selection.
Hope this makes sense.
- mathetesDec 13, 2021Gold ContributorMy example, of course, was just that: an example of a concept, an example of what could be done. From what you've written I see no conceptual difference between Last and First Names and Category and Sub-Category. Perhaps you could provide a more complete example, or an image to illustrate what that table looks like.