+ Reply to Thread
Results 1 to 7 of 7

Substituting multiple values for data validation

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Substituting multiple values for data validation

    Hi all,

    Happy new year to everyone.

    Need a bit of help trying to substitute out values that i am using in data validation. From the sentence:

    Consulting (Logistics, IT, Management)

    I would like to remove the spaces, the (, the ) and the commas so that it reads:

    ConsultingLogisticsITManagement

    So that i can use it for data validation.

    In the data validation box i am trying the formula:

    =INDIRECT(SUBSTITUTE(substitute(substitute(substitute(c2," ",""),"(",""),")",""),",","")

    But i keep getting told i have an error. Any ideas?

    Many thanks,

    C

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Substituting multiple values for data validation

    Hi Chemist,

    Why are you using Indirect here... ? suggest you to use the substitute formula and create a separate column and use that in validation. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Substituting multiple values for data validation

    Hi DILIPandey,

    Im using the indirect formula as i am trying to make data validation based on information in c2. ( i have attached a work book to explain it easier.)

    1) The select a value from drop down list in c2
    2) Options in c3 are relevant only to the value selected in c2

    I am using named ranges but the issue i am having with is with removing the spaces and other bits so that the named range work

    Does this help?
    Attached Files Attached Files

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Substituting multiple values for data validation

    I would suggest you to try looking at Indirect function once again... it works on the text references and Indirect(ConsultingLogisticsITManagement) will not create any reference and hence you'll get error..

    As per your sheet... you need a result in C3 based on C2 value.. and you can use some type of lookup function here based on your requirement thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Substituting multiple values for data validation

    Morning,

    I am not sure that i am able to do the lookup with the amount of potential values that could be in C2. There are probably 15 options (i have only shown a sample) that a user could select from a list in cell c2. Is it possible to construct a look up for this large a number?

    Many thanks,

    C

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Substituting multiple values for data validation

    Try this instead..

    It makes use of a dynamic name range called 'List' for dependent data validation.

    Some reading on dependent data validation
    www.contextures.com/xlDataVal02.html
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Substituting multiple values for data validation

    Great stuff. Combination of your spreadsheet and the one that you linked to and i managed to get it working.

    Thanks to all that took the time to answer

    C

+ 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