+ Reply to Thread
Results 1 to 8 of 8

Help with Data Validation using INDIRECT function

  1. #1
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Help with Data Validation using INDIRECT function

    I've attached part of a workbook that shows a table (headed in black) with dropdown options using data validation. The named ranges for all the dropdowns are on the right (Blue headed). Column A gives the option to select 'Banking' or 'Bookmaker'. If Banking is selected in column A, then column B, using the INDIRECT function as the source for the data validation, limits the dropdown selections to the named range 'Banking' in Column I. Alternatively, if 'Bookmaker' is selected then selections are limited to column J's named range which is 'Bookmaker'.

    My problem is when using dropdowns with a third dependant list in column C, when there are many possible selections that could be made in column B. If I selected 'Bookmaker' in column A, I could choose from 28 bookmaker names in column B. With my current formula:

    =INDIRECT(SUBSTITUTE(A3&B3," ",""))

    ...this would mean having to create 28 dropdown lists for when 'Bookmaker' is selected in column A and one of the 28 bookmakers is selected in column B. So far I have just created 2 dropdown lists for column C for when 'Bookmaker' is selected in column A and a bookmaker is selected in column B - they are in column W and X. In my actual workbook I have a list of over 400 bookmakers and so it would be impractical to create 400 named ranges for the dropdown lists.

    The dropdown options in column C for when a bookmaker is selected in column B should always be:

    Transfer
    Charge
    Correction
    Start Bal.
    Win
    Lose
    Confiscation
    Bet

    Is there a way of having the formula provide the above dropdown list in Column C, when 'Bookmaker' is selected in Column A and any bookmaker name from Column J is selected in Column B, without having to create 400 named ranges?

    I was thinking along the lines of having the indirect formula being able to reference a lookup table. Thanks.

    Dan
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Help with Data Validation using INDIRECT function

    The same way as you have set it up in Column B, using named ranges
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Re: Help with Data Validation using INDIRECT function

    I don't see how without creating 400 named ranges. Column B was straight forward because only 2 options can be selected in column A, either 'Banking' or 'Bookmaker'. Both of these options have a named range in I and J respectively. For column C it seems a bit more complicated as I may have selected 'Bookmaker' in column A, 'Betfair' in column B. A named range would be needed for when 'Bookmaker' & 'Betfair' are selected. 27 other named ranges would be needed for the occasions when I had selected one of the other 27 bookmakers. As I say, my actual workbook has a list of over 400 bookmakers.

  4. #4
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Re: Help with Data Validation using INDIRECT function

    Is this something that can't be done without using VB script?

  5. #5
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Help with Data Validation using INDIRECT function

    Hello
    If the drop down options in Column C are always the same, as you state, for any Bookmaker, then you only need 1 Named range for the Bookmaker options and the same would apply to Banking. Link the Type to the Account Area drop down.

    DBY

  6. #6
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Re: Help with Data Validation using INDIRECT function

    Not sure how to do this because if 'Banking' is selected in column A, then in column B I can select from:

    Barclays_Bank
    Halifax_Bank
    Lloyds_TSB
    Nationwide_Bank
    Natwest_Bank

    This is because I have made a named range called 'Banking' providing these options and the data validation in the 1st row of column B uses =INDIRECT(A3)as its source. In column C I want the options of:

    Debit
    Credit
    Charge
    Correction
    StartBal.

    when 'Banking' has been selected in column A. The problem is, I already have a named range for 'Banking' which provides the 1st list of bank accounts as mentioned. How can I have column C reference the 2nd list when 'Banking' is selected in column A and using an INDIRECT formula as a data validation source?
    Last edited by ddub25; 07-14-2012 at 07:40 AM.

  7. #7
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Help with Data Validation using INDIRECT function

    Hello
    Take a look at the attachment. Unless I'm missing something, does this do what your're looking for?

    DBY
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    01-11-2007
    Posts
    127

    Re: Help with Data Validation using INDIRECT function

    Thanks DBY, that's exactly what I am after. It's been giving me a bit of a headache. I really appreciate your help. Thanks.

    Dan

+ 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