+ Reply to Thread
Results 1 to 4 of 4

Cascade Validation

  1. #1
    matelot
    Guest

    Cascade Validation

    I setup 2 dependent drop-down list using the validation and INDIRECT function
    in EXCEL. Everything works fine when I have 2 name ranges that refer to
    actual range. 1 cell with validation pointing to NAME1 and the other cell
    would have =INDIRECT(cell) in the value box. However, when I try to setup 1
    name range as =OFFSET(range,countif(row,condition),height) , it doesn't work
    on my spreadsheet. It's giving me an error.
    Is it a limitation from EXCEL? Any suggestion?

    Thanks

  2. #2
    Biff
    Guest

    Re: Cascade Validation

    Hi!

    INDIRECT "expects" a TEXT representation of a reference.

    When you use a defined FORMULA to create a dynamic range and then call that
    in INDIRECT:

    =INDIRECT(MyRange)

    MyRange evaluates to a FORMULA, not a TEXT representaion of a reference.

    One way to "get around" this is to use CHOOSE instead of INDIRECT. (CHOOSE
    can have up to 29 values returned, so you'd need to have <=29 named ranges
    to use as the source for the drop downs)

    Suppose one drop down contains the named ranges: Rng1, Rng2, Rng3. This drop
    down is in cell A1 and the drop down in cell B1 is dependent upon the
    selection made from the drop down in cell A1.

    Create a list of the named ranges somewhere in the sheet, say, J1:J3:

    J1 = Rng1
    J2 = Rng2
    J3 = Rng3

    Now, as the source for the dependent drop down in cell B1:

    =CHOOSE(MATCH(A1,J1:J3,0),Rng1,Rng2,Rng3)

    Biff

    "matelot" <[email protected]> wrote in message
    news:[email protected]...
    >I setup 2 dependent drop-down list using the validation and INDIRECT
    >function
    > in EXCEL. Everything works fine when I have 2 name ranges that refer to
    > actual range. 1 cell with validation pointing to NAME1 and the other cell
    > would have =INDIRECT(cell) in the value box. However, when I try to setup
    > 1
    > name range as =OFFSET(range,countif(row,condition),height) , it doesn't
    > work
    > on my spreadsheet. It's giving me an error.
    > Is it a limitation from EXCEL? Any suggestion?
    >
    > Thanks




  3. #3
    Gord Dibben
    Guest

    Re: Cascade Validation

    matelot

    Have a look at Debra Dalgleish's site for instructions on setting dependent
    drop-downs and dynamic ranges.

    May be something there that will show what you have missed.

    http://www.contextures.on.ca/xlDataVal02.html


    Gord Dibben Excel MVP


    On Thu, 17 Nov 2005 13:50:06 -0800, "matelot"
    <[email protected]> wrote:

    >I setup 2 dependent drop-down list using the validation and INDIRECT function
    >in EXCEL. Everything works fine when I have 2 name ranges that refer to
    >actual range. 1 cell with validation pointing to NAME1 and the other cell
    >would have =INDIRECT(cell) in the value box. However, when I try to setup 1
    >name range as =OFFSET(range,countif(row,condition),height) , it doesn't work
    >on my spreadsheet. It's giving me an error.
    >Is it a limitation from EXCEL? Any suggestion?
    >
    >Thanks



  4. #4
    matelot
    Guest

    Re: Cascade Validation

    Biff,
    Thanks for the info. It works like a charm!

    "Gord Dibben" wrote:

    > matelot
    >
    > Have a look at Debra Dalgleish's site for instructions on setting dependent
    > drop-downs and dynamic ranges.
    >
    > May be something there that will show what you have missed.
    >
    > http://www.contextures.on.ca/xlDataVal02.html
    >
    >
    > Gord Dibben Excel MVP
    >
    >
    > On Thu, 17 Nov 2005 13:50:06 -0800, "matelot"
    > <[email protected]> wrote:
    >
    > >I setup 2 dependent drop-down list using the validation and INDIRECT function
    > >in EXCEL. Everything works fine when I have 2 name ranges that refer to
    > >actual range. 1 cell with validation pointing to NAME1 and the other cell
    > >would have =INDIRECT(cell) in the value box. However, when I try to setup 1
    > >name range as =OFFSET(range,countif(row,condition),height) , it doesn't work
    > >on my spreadsheet. It's giving me an error.
    > >Is it a limitation from EXCEL? Any suggestion?
    > >
    > >Thanks

    >
    >


+ 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