Dropdown lists from data>validation.

M

MichaelZ

In cell B9 I have a dropdown list of health-related questions that a user can
select from.
In cell B10 I have a dropdown list of more specific health-related questions
that a user can select from.
What I'd like to do is, if the user chooses one of the questions from the
dropdown list in cell B10, I'd like the contents of cell B9 to be blank. How
can I do this? Thanks in advance.
 
S

Sean Timmons

My thought is, just Right click on the tab name and select View Code...

Change the left drop-down to Worksheet

then enter

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B10").Value <> "" Then
Range("B9").Value = ""
End If
End Sub
 
S

ShaneDevenshire

Hi,

No code necessary:
Select cell B10 choose Data, Validation, List, and in the Source box enter
the range where your desired list is.
Select cell B9 choose Data, Validation, List, and enter a formula of this
form:
=IF($B$10="",$A$1:$A$4,$K$1)

K1 should be an empty cell. A1:A4 is the default list you want to display
in the data validation drop down. Different from the list range in B10.


If this is helpful, click the Yes button.
 
M

MichaelZ

Shane - thanks, that was helpful. Wondering if it's possible, though, for a
selection made from the dropdown list in cell B9 to automatically disappear
once a selection is made from the dropdown list in cell B10?

Thanks for your help.
MZ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top