+ Reply to Thread
Results 1 to 5 of 5

VBA macro for matching and copying cells

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    VBA macro for matching and copying cells

    Hi,

    I am trying to create a little bit complicated VBA macro, which will match and update data based on a few logical conditions across two workbooks

    Ideally the macro will match the worksheets names from file Months with values in column A in workbook Summary.

    In case the value in cell C24 of Months is Y the string "Pass" will be populated to an appropriate column in row 13 of Summary workbook based on current month (J2).
    In case the value in cell C24 of Months is N the string "Fail" will be populated to an appropriate column in row 13 of Summary workbook based on current month (J2).

    I'd appreciate some help. Thanks.
    Attached Files Attached Files
    Last edited by bizzarofen; 06-05-2017 at 08:18 AM.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA macro for matching and copying cells

    Will both workbooks be open at the time, or does the code need to open the "other" (presumably Months) workbook? Is the code supposed to be in the Summary workbook?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Re: VBA macro for matching and copying cells

    Hi Arkadi, I suppose it'd be more convenient if the code opens the Months workbook. And ideally the code will be placed in Summary workbook.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA macro for matching and copying cells

    Ok, here is code for the Summary workbook.... you will just need to adjust the path for the Months file:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Re: VBA macro for matching and copying cells

    Thank you so much Arkadi, that's just brilliant.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Matching Cells between two documents & copying sheets/hyperlinking cells via toolbar macro
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2015, 06:29 PM
  2. Replies: 0
    Last Post: 05-15-2013, 03:22 AM
  3. [SOLVED] Matching cells and copying the whole row
    By taibe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2013, 09:42 PM
  4. [SOLVED] Comparing two worksheets and copying matching cells to third sheet help
    By Sanzer in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2012, 04:31 PM
  5. [SOLVED] Matching cell to range, and copying adjacent cells.
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-14-2012, 12:11 PM
  6. matching string from a list and copying adjacent cells
    By Derivatives in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2011, 11:07 AM
  7. Matching 2 cells and copying row contents.
    By StevePike1990 in forum Excel General
    Replies: 4
    Last Post: 10-14-2010, 11:22 AM

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