+ Reply to Thread
Results 1 to 4 of 4

Thread: Name lookup

  1. #1
    Registered User
    Join Date
    01-20-2010
    Location
    PEI, Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Lightbulb Name lookup

    Hi all,

    I have been playing around with this for a bit and now have it sorted out. This is a macro that will check a name list and highlight any cell that contains one or more of the names.

    Since writing it I found it quite usefull.

    Code:
    Sub find_name()
    Dim name_list As Range, c As Range, d As Range, lookup_list As Range
    Worksheets("name list").Activate
    Set name_list = Range(Range("A2"), Range("A2").End(xlDown))
    Worksheets("Sheet1").Activate
    Set lookup_list = Range(Range("A2"), Range("A2").End(xlDown))
    For Each c In lookup_list
        For Each d In name_list
            If InStr(UCase(c.Value), UCase(d.Value)) Then c.Interior.ColorIndex = 6
        Next d
    Next c
    End Sub
    All you have to do is create a tab called "name list" and list all the names you are looking for in the Column A. Then on Sheet 1 column A have the data you are looking through.

    Hope this helps.

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,134

    Re: Name lookup

    Is this solved?
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-20-2010
    Location
    PEI, Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Name lookup

    Ya, I figured it out. Just wanted to post incase someone was looking for it. Sorry new here.

  4. #4
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,134

    Re: Name lookup

    Okay, thanks..

    In that case maybe better in the Tips/Tutorials forum

    ....moved.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

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.2.0