+ Reply to Thread
Results 1 to 3 of 3

Vlookup macro

  1. #1
    Registered User
    Join Date
    01-12-2009
    Location
    Bellevue, WA, USA
    MS-Off Ver
    Excel 2000
    Posts
    2

    Vlookup macro

    Hi, I'm Barney and a novice at VBA. I have created a macro to open a workbook from another workbook and do a vlookup against the data in the source workbook. I then wanted to highlight the cells in the in the workbook that I'm doing the vlookup from, and to unhighlight any empty cells. I did this all without code using the macro recorder so that I could then study the code and learn something.

    Couple of questions. My buddy does this stuff with code and his code is very elegant compared to what you get when you record a macro and then view the code. Here is the code:

    Please Login or Register  to view this content.
    Questions are:

    1. Is there a simpler way to do this so that it is more economical in code simpler to understand?

    2. How do I make the unpopulated cells loose the color format?

    I hope this makes sense!

    Thanks for any help!


    Barney
    Last edited by BarneyB; 01-12-2009 at 06:24 PM. Reason: Put Code tags in

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello BarneyB,

    Here is the revised macro. Much easier to read and understand.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-12-2009
    Location
    Bellevue, WA, USA
    MS-Off Ver
    Excel 2000
    Posts
    2

    Thanks!

    A belated thank you for the help!

+ 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