+ 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,

    I’m 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
    365
    Posts
    7,920

    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
    365
    Posts
    7,920

    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)

Similar Threads

  1. [SOLVED] using a data validation drop down list AND an IF formula in the same cell
    By bite_tony in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-23-2021, 02:59 AM
  2. Replies: 2
    Last Post: 05-09-2017, 02:42 PM
  3. Replies: 4
    Last Post: 10-13-2014, 09:16 AM
  4. Populate cell data based on data validation (drop down list)
    By ish_baho in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-05-2014, 11:47 PM
  5. [SOLVED] Data validation: How to create different drop down lists depending on user's response?
    By WillGe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2012, 04:39 AM
  6. Replies: 2
    Last Post: 05-12-2011, 09:23 PM
  7. Data validation list depending on other cell
    By Skato in forum Excel General
    Replies: 1
    Last Post: 10-21-2010, 04:22 AM

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