+ Reply to Thread
Results 1 to 8 of 8

Validation based on a range of values

  1. #1
    Registered User
    Join Date
    06-01-2006
    Posts
    36

    Validation based on a range of values

    I am trying to figure out how to validate the entry into a cell based on a list located in the worksheet. For example. I have a list of names, and the user should enter one of those names in Cell A3. The only problem is that the list of names changes. So I can't write the validation to reference the specific names. I hope I can have the validation reference the range that contains the names and makes sure that the entry is one of those names.

    Does anyone knwo if this is possible, and hopefully how to do it? Thanks for any help you can provide.

  2. #2
    Registered User
    Join Date
    01-18-2004
    Posts
    15
    hi
    give your range of names a dinamic_range_name and on data validation choose the list and for reference give that dinamic range name.
    Avner

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Just give a name to your reference list
    (with Insert Name Define)

    then in the Data Validation
    Select List
    and in the Source area, type
    =NameOfList

    do not forget the sign = ...

    HTH
    Carim

  4. #4
    Registered User
    Join Date
    06-01-2006
    Posts
    36
    Thanks Avner. Can you explain that a bit more?

  5. #5
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    You can define a range with a "dynamic range" i.e a range which adjusts itself automatically ...

    Insert Name Define
    give your range a name
    in the formula area type
    =Offset(Sheet1!$A$1,0,0,CountA(Sheet1!$A:$A),CountA(Sheet1!$1:$1))

    HTH
    Carim

  6. #6
    Registered User
    Join Date
    01-18-2004
    Posts
    15
    Quote Originally Posted by Carim
    You can define a range with a "dynamic range" i.e a range which adjusts itself automatically ...

    Insert Name Define
    give your range a name
    in the formula area type
    =Offset(Sheet1!$A$1,0,0,CountA(Sheet1!$A:$A),CountA(Sheet1!$1:$1))

    HTH
    Carim
    that is to say that the list starts in A1.
    If the list of names is 1 column, the CountA(Sheet1!$1:$1) is replaced with 1

    avner

  7. #7
    Registered User
    Join Date
    06-01-2006
    Posts
    36

    Thanks

    Thanks guys. I got it. That works great!

  8. #8
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad your problem is fixed

    Thanks for the feedback

    Carim

+ 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