+ Reply to Thread
Results 1 to 4 of 4

Copy & Paste Data from workbook to various sheets of another workbook based on date

  1. #1
    Registered User
    Join Date
    02-16-2018
    Location
    Dallas, Texas
    MS-Off Ver
    Office 2013
    Posts
    2

    Question Copy & Paste Data from workbook to various sheets of another workbook based on date

    Hello,
    I am a new to VBA and would appreciate any assistance.

    I receive an Excel file each day with a variety of data. All of the data in this workbook is on Sheet1 Columns A through AE and the number of rows can vary. Column A contains the date for each entry in the following format 02/15/2018.

    I have another workbook that I am using to track this data throughout the year and it has a sheet for each month (i.e. Jan 2018, Feb 2018, Mar 2018, etc).

    I am trying to create a macro that would search through the rows of data in the file I receive each day and copy/paste the row(s) in the applicable sheet of the destination workbook. For example, a date of 01/10/2018 would paste to the first empty row in the Jan 2018 sheet, 02/15/2018 would paste in to the first empty row of the Feb 2018 sheet, etc.

    Any thoughts on how to best accomplish this task?

    Thank you in advance for any help you can provide!

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Copy & Paste Data from workbook to various sheets of another workbook based on date

    See if this works for you

    Since the destination workbook is the one you maintain, that file should be saved as a macro enabled workbook and the code below should be copied to code module1. Since no workbook names are provided, it is assumed that the destination workbook will be opened first and the received file will be opened second, making them workbooks(1) and workbooks(2) respectively. You can substitute the actual workbook names for a more stable code.

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    02-16-2018
    Location
    Dallas, Texas
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Copy & Paste Data from workbook to various sheets of another workbook based on date

    That worked like charm -- thank you!

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Copy & Paste Data from workbook to various sheets of another workbook based on date

    Quote Originally Posted by kp88 View Post
    That worked like charm -- thank you!
    You're welcome,
    regards, JLG

+ 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. Copy & Paste from Workbook A to Workbook B Based on Date and value of cell
    By Jalica in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-16-2018, 01:29 AM
  2. Looper to Loop through sheets in workbook and copy paste to another workbook
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2017, 12:57 AM
  3. Replies: 12
    Last Post: 10-28-2015, 11:48 PM
  4. Copy values from sheets in workbook and paste in one sheet in the same workbook
    By RinorM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2015, 04:14 AM
  5. Replies: 6
    Last Post: 01-29-2013, 07:01 AM
  6. Copy 2 sheets from a open workbook and paste to a closed workbook
    By grimston in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2012, 03:27 PM
  7. Replies: 4
    Last Post: 09-15-2012, 02:18 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