+ Reply to Thread
Results 1 to 3 of 3

Lookup cell and copy entire cell, not the value

Hybrid View

The Intern Lookup cell and copy entire... 07-06-2011, 11:56 PM
JBeaucaire Re: Lookup cell and copy... 07-07-2011, 01:50 PM
The Intern Re: Lookup cell and copy... 07-07-2011, 11:22 PM
  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Bangkok
    MS-Off Ver
    Excel 2007
    Posts
    22

    Lookup cell and copy entire cell, not the value

    Hey everyone,

    I have a very long list of names I should put into a dropdown list. In order to make it a bit clearer and shorter, my idea is that the user states the first character of the name and a dropdown list with only the names starting with this character will appear in a close-by cell.
    So I have a list of letters and dropdown lists like that:
    A I Dropdown list for names beginning with A
    B I Dropdown list for names beginning with B
    C I Dropdown list for names beginning with C
    ...
    Is there any possibility to use some kind of vlookup macro that copies the entire cell( with dropdownlist) related to the stated character.

    My macro starts like that:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
       If Not Intersect(Target, Range("J7")) Is Nothing Then
       If Range("J7") = "" Then GoTo 123
    
    ????
    
    End If
    Range("D5").Select
    123
    End If
    End Sub
    Now I need to fill the blank in the middle :-D
    Thanks for your help!!

    The Intern
    Last edited by The Intern; 07-06-2011 at 11:59 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup cell and copy entire cell, not the value

    As long as you main list is a single column and it's sorted ascending, you can actually accomplish all this in a single cell. I have a technique for creating smaller sublists from a larger list, all operating in the same cell. The page here leads to three different examples of ways to use it...
    Sub DV Lists from a Larger DV List



    The SINGLE NAME LIST version might be the most directly applicable:
    Single Name List (Sub DV list)



    With this, you could have a drop down listing "A Names, B Names, C Names, etc.." and after you make a choice, you then reopen the SAME drop down and now the list names appears. Very fun.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-15-2011
    Location
    Bangkok
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Lookup cell and copy entire cell, not the value

    Hey Jerry Beaucaire,

    thank you so much, it's working perfectly! I just had to use the first suggestion you stated, because some names are in Thai or start with a number.

    Thanks again!!!

+ 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