+ Reply to Thread
Results 1 to 4 of 4

Assign a cell a value or a drop-down list (data validation) depending on another value

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    Greece
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    3

    Assign a cell a value or a drop-down list (data validation) depending on another value

    Hi,

    Im trying to use data validation to do the following action but with no success. I do not know if it is even possible:

    If cell A1=False then cell A2 to get the value N/A, otherwise, If cell A1=True then cell A2 to be assigned a drop down list of 2 elements (A, B).

    Can someone please help me how to do it?

    Thanks in advance,
    Tas

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    7,005

    Re: Assign a cell a value or a drop-down list (data validation) depending on another value

    What you want to do is called "cascading dropdowns" and there are several ways to do it. I suggest that you do a web search on them. The solution presented here is specific to this requirement and while it does work, it isn't very general and might not work for future requirements.

    With this particular requirement, you also have a unique solution.

    First make a couple of named ranges.
    - List1 contains only the cell E1 which contains the value N/A
    - List2 contains the cells F1:F2 which contain the values A and B.

    The validation in cell A2 is =IF($A$1=TRUE,List1,List2)
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    08-01-2016
    Location
    Greece
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    3

    Re: Assign a cell a value or a drop-down list (data validation) depending on another value

    Hi,

    Thank you for your reply.
    I have actually got this far. However if you notice my problem is not about using 2 list but 1 value and 1 list. So, when the cell A1=True then cell A2=”N/A” (assignement).
    When A1=False then I need the drop down list with 2 elements (A, B).


    Thanks again for your help, I’m looking forward for your expert help!
    Tassos

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    7,005

    Re: Assign a cell a value or a drop-down list (data validation) depending on another value

    Add this code to the worksheet module for Sheet1 (or whatever sheet you want this to happen on).
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1