+ Reply to Thread
Results 1 to 7 of 7

Data Validation based on cell value

  1. #1
    Forum Contributor
    Join Date
    05-26-2008
    Posts
    122

    Data Validation based on cell value

    Hi all

    I am trying to set the data validation on a cell based on another cell value

    So basically if the User enters say CAN in cell A2, cell B2 should use "listCAN" range as the data validation list

    and if i enter US in A2, B2 should use "listUS" as the data validation list ?

    any help is greatly appreciated. Thanks
    Last edited by manny_cb; 07-14-2009 at 12:32 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation based on cell value

    Your 2nd validation list would use an INDIRECT function as source:

    =INDIRECT("list"&A2)

  3. #3
    Forum Contributor
    Join Date
    05-26-2008
    Posts
    122

    Re: Data Validation based on cell value

    That wont work

    I can enter either U001 or CA01 as my option in A2.

    But when i do to name my dependent ranges as U001.. It says name is not valid :S

    so the problem still remains

    if i enter U001 in A2, I want B2 to use LISTUS for validation
    if i enter CA01 in A2, I want B2 to use LISTCAN for Validation

    please help. Thanks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Data Validation based on cell value

    Try allow
    list
    source
    =IF($A$2="U001",listus,listcan)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation based on cell value

    if i enter U001 in A2, I want B2 to use LISTUS for validation
    if i enter CA01 in A2, I want B2 to use LISTCAN for Validation
    Given this is completely different to your original post it's not surprising the prior suggestion didn't work... do you mean U001 or US01 (I ask given CA01)

    If you have lots of sub lists it makes a lot more sense to keep your named range naming convention such that it reflects the choices in the original list.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Data Validation based on cell value

    hear,hear! requirements do seem to have changed somewhat!

  7. #7
    Forum Contributor
    Join Date
    05-26-2008
    Posts
    122

    Re: Data Validation based on cell value

    That would do the trick .
    Thanks a lot for your quick help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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