I am trying to combine AND and IF statement in data validation.
I haveand it does not workPlease Login or Register to view this content.
Any suggestions?
I am trying to combine AND and IF statement in data validation.
I haveand it does not workPlease Login or Register to view this content.
Any suggestions?
Without having your workbook to test this I am guessing that the problem is that the "else" part of your IF statement is missing. If you did that in a cell, then the result would be FALSE if your condition were not true. But it may be invalid to omit it in a data validation list.
Please explain what "doesn't work" means.
- Does it do nothing?
- Does it produce error messages? If so, what do the messages say?
- Does it produce unexpected/wrong results? If so, what do you expect, and what do you actually get?
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
Thanks for the reply. There is error msg prompted saying: "The list source must be a deimited list, or a reference to single row or column."
I have 4 drop down lists and source data for lists in different sheets in the workbook. Depending on value i select i want other lists to show me values from selected cells (like you could figure out from the code i posted in my thread).
Thanks
You need to assign a value_if_false parameter on this. Choose an empty cell, make sure it's empty (or have it say "N/A"), and then add a reference to that cell.
Formula:Please Login or Register to view this content.
where A1 in 'SomeHiddenSheet' is a blank cell.
Once share your workbook to us with expected result.
Thanks for this. It did work but unfortunately there is another issue when I add another "IF" statement. The message says "You may not use reference operatos (such as unions, intersections, and ranges) or array constants for Data Validation criteria"
Please Login or Register to view this content.
Your IF statement "returns" an array if TRUE so I think this the problem: what are you trying to do?
and is this what you want (apart from the array issue) ...combining the IFs
=IF(AND($D$12="Mk6e-i2",$F$12="Unmachined",$H$12="CA"),'Mk6e-i2 CA'!$F$9:$G$200,IF(AND($D$12="Mk6e-i2",$F$12="Machined",$H$12="CA"),'Mk6e-i2 CA Machined'!$F$9:$G$200,$A$1))
Ah, didn't notice that the first time. The error says exactly what it is.
The list source must be a delimited list, or a reference to single row or column.
The references $F$9:$G$200 is 191 rows and 2 columns (i.e. does not fit the criteria above)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks