+ Reply to Thread
Results 1 to 9 of 9

Dependant list with illegal characters and multiple words

  1. #1
    Registered User
    Join Date
    09-02-2010
    Location
    Straya
    MS-Off Ver
    Excel 2007
    Posts
    7

    Dependant list with illegal characters and multiple words

    Hi guys, I have had a look for answers to this problem and keep getting stuck. I will try to simplify the scenario.

    Part of a work book I'm working on requires related columns - division name and section name of work areas responsible for certain functions. I need lists for both and am trying to use a dependant list for section (e.g. only the corresponding sections associated with the selected division are available). While I need to generate a dependant list, the division first range has cells with illegal characters (&) and multiple words. I'm not sure which is causing me problems to be honest.

    Range A7:A10 is "Divisions". A2 has data validation allowing a list, with the source "=Divisions". This step works fine and returns all four divisions listed in the range.

    Range A13:A16 is "Finance", A19:A21 is "HumanResources", A27:A30 is "FacilitiesANDSecurity" and A37:A39 is "Operations". I did this because the actual titles (for want of a better word), using multiple words and ampersands, are invalid.

    B2 has data validation also allowing a list, with the source "=Indirect(A2)". Selecting either of the one-word division names in A2 (Finance and Operations) result in the related section names being visible in the list in B2. Selecting either of the other two division names results in no names in the list. THIS IS THE PROBLEM!!! How do I use the dependanty list so that division names with illegal characters or multiple words show the associated section names???!!

    In the sample, below, the response is entered in A2:A4 and B2:B4 (3 entries for this purpose).

    A B
    1 Division Section
    2
    3
    4
    5
    6 Divisions
    7 Finance
    8 Human Resources
    9 Facilities & Security
    10 Operations
    11
    12 Finance
    13 Accounts
    14 Reporting
    15 Strategic Advice
    16 Banking
    17
    18 Human Resources
    19 Employee Entitlements
    20 Conduct
    21 Analytics
    22
    23 Facilities & Security
    24 Facilities Management
    25 Help Desk
    26 Personnel Security
    27 Protective Security
    28
    29 Operations
    30 Team 1
    31 Team 2
    32 Team 6

    I have tried to use a lookup table without succeeding in anything but further confusion. Hopefully there is a simple solution for someone far more competant with Excel than me. If you have a solution, please use simple language.

    Many thanks

  2. #2
    Registered User
    Join Date
    09-02-2010
    Location
    Straya
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Dependant list with illegal characters and multiple words

    I've attached a sample file - hopefully that helps my description of the problem??!!
    Attached Files Attached Files

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dependant list with illegal characters and multiple words

    Perhaps this will help you. All the lists have been combined into one main list and from there the various lists that are required are extracted.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    09-02-2010
    Location
    Straya
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Dependant list with illegal characters and multiple words

    Thanks newdoverman - that solution appears to work. I'm not exactly clear how you've done it though, I assume with dynamic lists?

    Can you give a simple step by step of your solution?

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dependant list with illegal characters and multiple words

    You are correct that the lists are dynamic. The whole "scheme" depends upon 3 names in the Name Manager.

    1. MasterList =Lists!$A$2:INDEX(Lists!$1:$8,8,COUNTA(Lists!$1:$1))

    This is a dynamic list that starts in worksheet Lists in A2 which is followed by : which is the second part of the required array to define MasterList. the INDEX part $1:$8 defines the top row Divisions, Finance etc , the next argument is the number of rows (8). The COUNTA part is in the columns part of the INDEX function and counts the number of columns by counting the top row for non blanks (5) So the range is $A$2:$E$8

    2. COUNTER =COUNTA(INDEX(MasterList,,MATCH('List sample'!B5,Lists!$1:$1,0)))
    This counts the non blank cells in the column indicated by the MATCH.....This makes the column dynamic and only shows occupied cells.

    3. DVList =INDEX(MasterList,1,MATCH('List sample'!B5,Lists!$1:$1,0)):INDEX(MasterList,Counter,MATCH('List sample'!B5,Lists!$1:$1,0))

    This takes the value from B5 and matches it against the column headers in the MasterList and the Counter is again used for the creation of the dynamic list.

    I hope that this rambling explanation is somewhat understandable. It is sometimes easier to do than explain....like driving.

  6. #6
    Registered User
    Join Date
    09-02-2010
    Location
    Straya
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Dependant list with illegal characters and multiple words

    Thanks again newdoverman - I know what you mean by trying to explain something like this. However it seems, true to your analogy, that I can't even walk let alone drive...

    I have tried to follow your explaination a hundred times, but I continue to get errors. The attached sheet has the same as the number of 'options' that the live data will contain - would you be able to explain or show in that context?

    Thanks heaps!!
    Attached Files Attached Files

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dependant list with illegal characters and multiple words

    Here is your file with the drop downs working correctly. The strange thing that I have found with the creation of drop down lists, especially the dynamic cascading type is that you have to be very careful to check that the cell references haven't changed on you while you are creating the name definitions. It helps to start off with creating a list that everything else will descend from then select a cell where the descendant list will be located....the cell references can still change so you have to be careful and check everything as you go along.
    Attached Files Attached Files
    Last edited by newdoverman; 01-28-2014 at 10:06 AM.

  8. #8
    Registered User
    Join Date
    09-02-2010
    Location
    Straya
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Dependant list with illegal characters and multiple words

    Newdoverman, you are a marvel. I still don't understand a couple of parts of the dynamic lists, but I can work around that now. Thank you so much!!

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dependant list with illegal characters and multiple words

    Thank you for the feedback and good luck with your project.

+ 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. Making third Validation list that is dependent in column A&B (with illegal characters)
    By Elainefish in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2013, 10:21 AM
  2. Validation list (with illegal characters in the range list)
    By Elainefish in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-04-2013, 04:38 PM
  3. Replies: 0
    Last Post: 01-11-2012, 11:07 PM
  4. Dependant drop down validation with illegal characters
    By mewingkitty in forum Excel General
    Replies: 6
    Last Post: 12-02-2008, 04:37 PM
  5. check for illegal characters
    By damteity in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2008, 04:06 PM

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