Dropdown lists from datavalidation.
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. |
Dropdown lists from datavalidation.
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 "MichaelZ" wrote: 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. |
Dropdown lists from datavalidation.
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. -- Thanks, Shane Devenshire "MichaelZ" wrote: 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. |
Dropdown lists from datavalidation.
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 "ShaneDevenshire" wrote: 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. -- Thanks, Shane Devenshire "MichaelZ" wrote: 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. |
All times are GMT +1. The time now is 01:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com