+ Reply to Thread
Results 1 to 4 of 4

Search and return value to the left? Variables!

  1. #1
    Registered User
    Join Date
    04-17-2011
    Location
    Orlando
    MS-Off Ver
    Excel 2007
    Posts
    27

    Exclamation Search and return value to the left? Variables!

    Hello,


    I have one column with employee names (Column L) and and another column with employee ID numbers (Column M)

    I need a macro that when the Employee ID number is searched it returns the Employees Name.

    A previous thread helped me and gave me this:

    Please Login or Register  to view this content.

    But I was hoping that I could Dim both the Employee Name and Employee number both as their own string somethting like this maybe:
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Search and return value to the left? Variables!

    Do you mean like this?

    Please Login or Register  to view this content.
    abousetta

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

    Re: Search and return value to the left? Variables!

    Just a note, when using a variable to direct commands applicable to a specific sheet object, attach that object to each range object in your commands, not just most of them, all of them.

    So this line of code:
    Please Login or Register  to view this content.
    Should really be this:
    Please Login or Register  to view this content.
    Or this:
    Please Login or Register  to view this content.
    _________________
    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!)

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Search and return value to the left? Variables!

    Excellent point JB. Catching these early on saves a lot of time down the road.

    abousetta

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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