+ Reply to Thread
Results 1 to 4 of 4

VBA Code to Match Dates in Two Cells Then Copy the Data Under the Corresponding Date

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20

    VBA Code to Match Dates in Two Cells Then Copy the Data Under the Corresponding Date

    Hello Brilliant Minds,

    My VBA is shaky at best. Is there a VBA way to take The date that is in Active worksheet, cell B2, and match it with Range K4:Q4, and have specific cells copy under the column in the range where the date was matched? In this case Column P starting at Cell P5? See attached for better explanation. Much Appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: VBA Code to Match Dates in Two Cells Then Copy the Data Under the Corresponding Date

    Your example is not clearly defined. Can you give a BEFORE and AFTER example in an excel sheet?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VBA Code to Match Dates in Two Cells Then Copy the Data Under the Corresponding Date

    Where do the historical data go?

    How are the program avg calculated?
    Attached Files Attached Files
    Last edited by rcm; 10-09-2014 at 05:22 PM.

  4. #4
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: VBA Code to Match Dates in Two Cells Then Copy the Data Under the Corresponding Date

    Thank you both for looking at this. This is just a snippit from a very large workbook. The Average is a formula that is calculated from large amounts of data on another sheet. The historical data is kept under the date, that is why I need a paste value, so the formula doesn't come over with it. I have added before and after shots with some more notes.
    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)

Similar Threads

  1. [SOLVED] VBA code pull data from SQL db - need output dates in proper date format
    By seatejo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2014, 02:28 AM
  2. [SOLVED] Macro to match date in data table and copy cell range containing date.
    By 54ed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2014, 04:52 AM
  3. [SOLVED] INDEX date that MATCH on date range, MATCH code(string)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 03:33 AM
  4. Replies: 1
    Last Post: 06-18-2013, 06:32 PM
  5. [SOLVED] VBA code to copy column data only if headers match
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2012, 11:23 PM

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