Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Validation Lists in Excel

Status
Not open for further replies.

krupa

Programmer
Oct 8, 2002
5
US
Hello,

I have two cells Cell A and Cell B.
The value in Cell B depends on what is in Cell A.
I can get the list of cell B to be based on what is in Cell A, but if i have a value in cell B and I change the value of cell A, my list for cell B changes, but the value of Cell B is what it was before the value of A changed, but it is not apart of the new list.
How can I get Cell B to clear its value when A has changed or get it to give an error when the value in the cell is not in the list. I have the error checking turned on for the validation list.

Thank you,
Krupa
 
worksheet change event
Pseudo code 'cos you havn't provided enuff info

on error goto errHandle
mVar = worksheetfunction.vlookup(cellB,validationrange,1,false)
exit sub
errHandle:
cellB.clearcontents
end sub Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top