How to create drop down that only functions when another cell is not blank?

Scott R Pelton 0 Reputation points
2025-08-08T16:30:39.2666667+00:00

Hi,

I have a drop down that is dependent on the selection from another drop down cell. When the user selects the Sheet Item Number (20044290 or 20044297) from the drop down in cell S17, it will then populate the respective drop down items (per the tables below) in the Item # cell (A22). This works great, but my issue is that the user can manually enter data into the Item # cell (A22) when the Sheet Item Number cell is blank, and I need to prevent this. In other words. cell A22 should only accept a value when S17 is not blank.
Thanks for any help.

User's image

User's image

Cell A22 Drop Down data dependent on cell S17 drop down selection.
User's image

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chris Duong 860 Reputation points Microsoft External Staff Moderator
    2025-08-08T17:08:56.33+00:00

    Hi @Scott R Pelton,     

    Good day to you! Welcome to Microsoft Q&A forum. 

    Thank you for reaching out and for the detailed explanation, it really helps in understanding your setup. 

    You’ve configured a dependent drop-down in cell A22 based on the selection in S17, which works well. To prevent users from entering data in A22 when S17 is blank, you can apply a custom data validation rule. 

    I'd suggest trying the following steps: 

    1/ Select cell A22. 

    2/ Go to the Data tab and click Data Validation. 

    3/ In the Data Validation dialog: 

    • Set Allow to: Custom 
    • Enter the following formula: =NOT(ISBLANK($S$17)) 
    • This formula ensures that A22 only accepts input if S17 has a value. 

    4/ (Optional) Add a message to guide users: 

    • Input Message: “Please select a Sheet Item Number in S17 before entering an Item #.” 
    • Error Alert: “You cannot enter an Item # unless a Sheet Item Number is selected in S17.” 

    5/ Click OK to apply the validation. 

    Explain: 

    When S17 is blank, Excel will block any input in A22 and show your custom error message. 

    Once S17 has a value, A22 will accept input as usual, including your dependent drop-down list. 

    Notes 

    • If you have a range of cells (e.g., A22:A40) that need this rule, you can apply the same validation formula to the entire range. 
    • This method works in all modern versions of Excel, including Microsoft 365. 

    For reference: 

    Looking forward to hearing how it goes. Please let us know if you require any additional guidance. I'm happy to help!    


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.