+ Reply to Thread
Results 1 to 4 of 4

VBA Macro Includes a VLookUp

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    VBA Macro Includes a VLookUp

    Hello...I am trying to create a VBA Macro that seems pretty simple but I cannot get it right.

    Column A in Worksheet 1 contains a list of numeric values that will change daily; the user will paste a new list into column A.

    I want to add a VLook Up in the macro that will read the occupied cell in column A and if there is a match bring the answer back to the adjacent cell in column B. If there is no match, I want to bring back text of my choosing rather than the default #N/A. The Table Array will be on a seperate sheet in the same workbook and this data will never change.

    If the cell in column A is blank then I want the adjacent cell in column B to be blank; this will only occur at the end of the list in column A...there should never be blank cells anywhere between the first and last lines of data. So essentially, once we have reached the bottom of column A, the macro is done.

    If anyone can help me with this I would be very appreciative.

    Thank you.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: VBA Macro Includes a VLookUp

    Does this need to be a macro or can you use formulas in Column B?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    02-09-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: VBA Macro Includes a VLookUp

    It needs to be a macro because this is going to be given to other users who will be pasting the new data in daily...I want to create a simple process for them.

  4. #4
    Registered User
    Join Date
    02-09-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: VBA Macro Includes a VLookUp

    Quote Originally Posted by ChemistB View Post
    Does this need to be a macro or can you use formulas in Column B?
    It needs to be a macro because this is going to be given to other users who will be pasting the new data in daily...I want to create a simple process for them.

+ 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