Closed Thread
Results 1 to 3 of 3

macro for vlookup

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2007
    Posts
    28

    macro for vlookup

    hello

    I have a file Book1.xls which has the following data

    Bardcode Quantity
    100 1
    102 3
    105 2
    167 1
    178 3
    189 1
    250 6
    345 3
    356 2
    478 1
    678 3
    679 1
    755 6



    and there is another file named Book2.xls which contains

    2
    4
    5
    7
    9
    11
    12
    13

    the task is to find out the barcodes for the Row number mentioned in Book2.xls.
    Using normal excel formula, i would paste the Col A of Book2.xls in Col F of Book1.xls, delete the header row. then i would calculate the row using =ROW() and paste it till 755. then i would use a VLOOKUP formula to find the barcodes of the row and paste the barcodes in Book2.xls.

    my final result of book 2 would be:

    2 102
    4 167
    5 178
    7 250
    9 356
    11 678
    12 679
    13 755


    but i want to do this via macro as there are multiple files to deal with. and it becomes very irritating to copy paste manually the columns.
    i wish to use the macro in Book2.xls so tht it would automatically calculate the missing barcodes of Book1.xls .

    please help as there are more than 200 files and manually doing this would be a headache. My boss has asked to find the missing barcodes and print them in book2.xls and send it to him

  2. #2
    Registered User
    Join Date
    10-01-2012
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: macro for vlookup

    Hope this will help u .. Check Bar Code Sheet & Result Sheet ...
    Attached Files Attached Files

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macro for vlookup

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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