+ Reply to Thread
Results 1 to 1 of 1

Matching and copying via VBA

  1. #1
    Registered User
    Join Date
    06-01-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    8

    Matching and copying via VBA

    Hello,

    I'm a new member to Excel forum. I'm working on a spread sheet which is part of my project. I believe I could grasp the logic for what I want, but it's the coding of Macro that got me.

    In the file, I have sheet1 and sheet2.
    I used countif to find if there is a match in bar codes between column A of sheet1 and sheet2. If there is a match, column B in sheet2 outputs 1; if there isn't a match, 0.

    I'd like to have a macro does the following trick:

    If it is 1 in column B in sheet2, then, macro could look up that corresponding bar code in sheet1, and find out where it is in term of row number in sheet1. Copy the information about date and initial and paste these to correct area in sheet1 by row number and offset 1 column (maybe?).
    Plus, all match cases should have "apple" in identity column in sheet1.

    If it is 0 in column B in sheet2, do nothing.

    I'd like to have the macro covering all bar codes in sheet2. So there might be a loop. I can always put a charactor or such to terminate the loop.

    Hopefully, I've done a decent job explaining. I really need some help from you guys. Thank you in advance.
    Attached Files Attached Files

+ 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