+ Reply to Thread
Results 1 to 2 of 2

Macro for WS/WB comparisons, and copy/paste two cells based on matches

  1. #1
    Registered User
    Join Date
    10-13-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    1

    Macro for WS/WB comparisons, and copy/paste two cells based on matches

    Hi All,

    I've been racking my brain for the last 5 days trying to solve this issue.

    Synopsis - Every day I receive an Excel file from a batch output, and essentially my job is to raise work tasks based on the new errors. This means that every day I have to go through anywhere between 50-1000 records and matching them with yesterdays output. Firstly, I peruse column A for a matching number between the two, then when I find a match, if column E and column J match also (date format and free text respectively), I copy the cells from columns B, C and D of that row (a number, the work task number and date raised) in yesterdays sheet, into today's sheet.

    Essentially I'm looking for a macro that:
    • Copies sheet 1 from yesterdays sheet into sheet 3 of todays sheet.
    • Compares the two sheets, based firstly on the NUMBER in column A, if match is found and value in cells E and J also match (date and text), then copy cells B, C and D for that row from sheet 3 (yesterdays) into sheet 1 (todays)
    • Important to note that the rows won't match based on row number but on cell values

    Any help would be greatly appreciated.
    I've been trying to reverse engineer the following code to at least get a start, but my 10+ years since using VB at school has taken me back to n00bdom.

    Please Login or Register  to view this content.
    I've also attached a spreadsheet just to show what I mean. (Because I'm a nice guy)

    Any help is appreciated!
    Last edited by adilley; 10-13-2011 at 08:35 PM. Reason: doesn't look like the attachment was added...

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro for WS/WB comparisons, and copy/paste two cells based on matches

    Hi adilley

    Still no attachment that I see.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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