+ Reply to Thread
Results 1 to 16 of 16

Data Validation List from table + string

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Data Validation List from table + string

    Hi,

    i have in DV lists reference to listobject:

    Please Login or Register  to view this content.
    List consists of 1,2,3.

    this is ok.
    But i want to have "Text" + =indirect("t_NWVersions[VersionName]") in DV list:
    Text
    1
    2
    3

    It is possible?

    Best,
    Jacek
    Last edited by jaryszek; 04-11-2019 at 03:02 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: DV List from table + string

    For the second and last time, please do not use acronyms that not everyone is supposed to understand. Please change your thread title accordingly. Thank you

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    No problem my friend,

    i didnt notice before that you mean about acronyms in title.

    Title changed,
    Best,
    Jacek

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Data Validation List from table + string

    Thank you. Understand this is in your best interest

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    The simple answer is no. You can use a delimited string, or a range, not a combination of both.
    Rory

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    thank you Rory!

    So only way to do this is creating macro in VBA.

    Should i set range from table first and resize to include string?

    Please help,
    Jacek

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    To use a range, the cells have to be contiguous so you would have to add the text to the table itself, or copy all the info somewhere else and use that range.

  8. #8
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    Hmm so i can not do something like that in memory?

    Maybe better option would be add values to dictionary and add one additional text value?
    And somehow assing dictionary to a range or maybe array and use as DV list?

    Or maybe i shoud use UDF and have this UDF as named range and use this named range as DV list?

    Best,
    Jacek

  9. #9
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    Again, no. You can use a range or a literal delimited string, nothing else. You would have to either create a delimited string and assign that to the cell's validation using a macro (a UDF will not work), or put the data in a range as I said earlier.

  10. #10
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    ok thank you.

    "You would have to either create a delimited string and assign that to the cell's validation using a macro"

    1. this seems to be not very useful. I would like to create macro for example on worksheet activate event and this is not best option i suppose.

    2. Why UDF will not work?

    Jacek

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    1. I don't know what answer you expect to that.
    2. Because it won't.

  12. #12
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    1. I don't know what answer you expect to that.
    I expected to get best possible solution here. So question is how you would do this?

    2. Because it won't.
    If you will create formula and have string in this formula it should work, can you explain why it won't?

    Best,
    Jacek

  13. #13
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    1. I would probably put the data in a range somewhere. I've never had cause to need to do this, so it's hard for me to imagine what the actual reason behind it is.
    2. That's just the way it is. It has to be a literal delimited string. You cannot use any sort of calculation.

  14. #14
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    Thank you rorya,

    i have source table from Access database but we want to add possibility for user to choose also "Local Defined Value" as text in DV.

    Best.
    Jacek

  15. #15
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Data Validation List from table + string

    Then I'd suggest you simply set up another reference table that you can use as the source for the DV.

  16. #16
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Data Validation List from table + string

    thank you Rorya,

    Best,
    Jacek

+ 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. Search a string to see if any words in list are found in string
    By nphadro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2018, 12:55 PM
  2. Search for string within a table and all rows that contain the string
    By shoulddt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2016, 12:27 PM
  3. Replies: 2
    Last Post: 12-29-2014, 11:24 PM
  4. Replies: 8
    Last Post: 09-27-2012, 10:46 PM
  5. Parse String and Fill list box with Each Found Sub String
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 05:56 PM
  6. Search 'String' and tag accordingly using 'String table'
    By tms12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2011, 02:10 PM
  7. [SOLVED] Match row that contains text text string; list associated values from pivot table
    By ACurtis802 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2009, 07:50 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