+ Reply to Thread
Results 1 to 3 of 3

Loop through column, match date, copy & paste row data to another sheet

  1. #1
    Registered User
    Join Date
    01-02-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    7

    Loop through column, match date, copy & paste row data to another sheet

    Greetings everyone,

    I have a little macro coding problem that I don't really even know where to begin with.

    The attached workbook has two sheets - Data & Summary.

    The Data sheet has a list of dates in column A (always 28 days and so the range will always be A2:A29) and a list of names in B2:K29. The Data sheet also has a command button to activate a macro.

    The Summary sheet contains a list of key dates in column A and space for names in columns B through K. Column A is currently populated from A2:A9 with key dates in 2020 and 2021, but this will increase further down column A as key dates in subsequent years become known.

    What I need the user to do is populate the Data sheet with names for the month and then click the command button. The command button macro needs to search through Data!A2:A29 for any of the dates listed in Summary!A:A, and if a match is found, copy the corresponding row data from the Data sheet and paste it in the corresponding row of the Summary sheet against the matched date. Essentially, it's a summary of any names listed against the key dates.

    Any help, even a start, would be greatly appreciated.

    Thanks in advance!

    Cheers

    Ben
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Loop through column, match date, copy & paste row data to another sheet

    Try this macro attached to the button:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    01-02-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    7

    Re: Loop through column, match date, copy & paste row data to another sheet

    Mate that's perfect - thanks very much for your help.

    Have a good day.

    Cheers

    Ben

+ 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. For Loop to Copy Paste Data from sheet to another
    By stein7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2019, 04:56 AM
  2. VBA Excel: Copy/Paste a column range to another sheet IF column headers match
    By hwatson86 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-07-2016, 08:05 AM
  3. Macro to copy & paste data into new sheet depending on column header (date)?
    By BobbyH89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2015, 03:44 PM
  4. Replies: 1
    Last Post: 05-30-2015, 04:38 PM
  5. Replies: 3
    Last Post: 11-06-2014, 01:23 AM
  6. [SOLVED] Copy/Paste Macro Loop For A column of Data
    By brooksbil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-31-2012, 02:31 PM
  7. Copy Paste and Loop till last column with data
    By eirumba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2011, 07:23 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