I need to check if the value selected in a drop down list is equal to the value of another cell and return an error message if it doesn't.
I need to check if the value selected in a drop down list is equal to the value of another cell and return an error message if it doesn't.
Well, here's something close to literally what you have asked:
1. In A1:A4 type your drop-down list values: cat, dog, unicorn, fish
2. Developer tab / Insert: Add a Combo Box (form control) then format control:
- Set Input range to A1:A4
- Set Cell link to B1
3. Put the value that you want to check against in E3 (one of cat, dog, unicorn or fish)
4. In D4 enter the formula:
=IF(INDEX(A1:A4,B1)<>E3,"ERROR: Selected value is not equal to " & E3, "")
This cell will display an error message if cell E3 does not match the Combo Box selection.
See the attached spreadsheet for an implementation of the above.
Is this close to what you are looking for??
SOLVED. Thank you. This was exactly what I needed.
No problem - glad I could hep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks