+ Reply to Thread
Results 1 to 11 of 11

Create a data validation list takes data from another sheet

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Create a data validation list takes data from another sheet

    Hello everyone
    I'm trying to create a data validation list .. I have two sheets (Data) and (Result)
    My data is in Sheets("Data") in range("A1:D50") .. I selected that range and put the cursor in name box and named it (MyData)
    Then went to sheets("Result") and selected a cell to create a validation list in it but I encountered an error
    (The list source must be delimited list ,or a reference to a single row or column)
    Thanks advanced

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create a data validation list takes data from another sheet

    Hi,

    As the message said, the list must be a single row or column. Your list is 4 columns.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Create a data validation list takes data from another sheet

    Hi, Yassir,

    you got the answer with the error: restrict the list to one column or row only if you are working with a named range (you may concatenate the contents in one column or add all values one under the other).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Create a data validation list takes data from another sheet

    I just followed your steps and it worked fine.

    1. highlight a range
    2. give it a range name
    3. on a 2nd sheet, DV/List/=MyData


    edit: thanks guys, I missed the multiple columns
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Create a data validation list takes data from another sheet

    thanks everybody
    Is there a way to concatenate the values in the range and stored it in an array rather than a helper column and use this array to create the validation list

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Create a data validation list takes data from another sheet

    As mentioned, DV takes a single-column range. Can you put the other columns of data (B:D) underneath what you have in A?

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Create a data validation list takes data from another sheet

    Hi, Yassir,

    do you mind to elaborate why you think the Range for DV should be a matrix instead of a single column/row? Maybe you would need a different control but thatīs hard to judge without further information or a workbook.

    Ciao,
    Holger

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Create a data validation list takes data from another sheet

    Hi everyone
    As a matter of fact the data is not in one column. they are in different columns and I want to concatenate all the data (note I can use one helper column to do that) but I don't like using helper columns .. So I want to store my data in memory using matrix and by running a macro to set my data validation list with my data.
    I hope it is clear now

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Create a data validation list takes data from another sheet

    If you use anything other than a range, you are limited to about 255 characters for the list - will that be enough? If so, you'll have to create the list string in code and assign it at the relevant point (eg when the cell or worksheet is activated). Using a helper column will be much easier.
    Remember what the dormouse said
    Feed your head

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Create a data validation list takes data from another sheet

    Quote Originally Posted by romperstomper View Post
    If you use anything other than a range, you are limited to about 255 characters for the list - will that be enough? If so, you'll have to create the list string in code and assign it at the relevant point (eg when the cell or worksheet is activated). Using a helper column will be much easier.
    So I have to surrender till that point.
    May be a nother idea is to create a helper column by code and use it then delete the column .. Is that a good idea or my list will be restricted to 255 characters too?

  11. #11
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Create a data validation list takes data from another sheet

    If you delete the column your list will stop working.

+ 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. Replies: 5
    Last Post: 09-26-2013, 11:45 AM
  2. Replies: 3
    Last Post: 05-23-2013, 06:23 AM
  3. Replies: 4
    Last Post: 02-15-2012, 12:11 PM
  4. Excel 2007 : Data Validation - Cannot create List
    By oopsieny in forum Excel General
    Replies: 3
    Last Post: 08-16-2010, 12:46 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