+ Reply to Thread
Results 1 to 11 of 11

Copy rows from worksheet to different worksheets based on row range

  1. #1
    Forum Contributor
    Join Date
    03-27-2022
    Location
    MS, USA
    MS-Off Ver
    Microsoft 365
    Posts
    143

    Copy rows from worksheet to different worksheets based on row range

    I have a report I receive daily from other coworkers. It has three major categories [Safety, Quality, Downtime] with details for the day. I have worksheets, with the same names as the categories. I want to copy the data from the worksheet "Daily Report" and if data is present in Safety, copy it to the next empty row in the worksheet "safety" and repeat the same steps for quality and downtime. Thank you in advanced for anyone willing to help or for even reading this.
    Attached Files Attached Files
    Last edited by Ajaxs87; 08-06-2022 at 04:47 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    The "Daily Report" worksheet has many merged cells. You should avoid using merged cells at all cost because they most often create problems for macros and/or make designing a code more difficult. Could you re-design the "Daily Report" worksheet eliminating the merged cells and then post a revised copy of your file?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    03-27-2022
    Location
    MS, USA
    MS-Off Ver
    Microsoft 365
    Posts
    143

    Re: Copy rows from worksheet to different worksheets based on row range

    Mumps1
    I do agree about the merged cell input, the problem I face is that I don't control this document and cannot change the setup on a major scale to have everyone use a modified version. So I need a macro that would work with this "not well structured" document. Thank you

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    OK. We can give it a try. The sheets Productivity Downtime and Safety have a few blank columns. Would it be OK if we deleted those columns?

  5. #5
    Forum Contributor
    Join Date
    03-27-2022
    Location
    MS, USA
    MS-Off Ver
    Microsoft 365
    Posts
    143

    Re: Copy rows from worksheet to different worksheets based on row range

    Sure thing, those will be on my personal document to transfer over the data they send daily. The original document they control only has the worksheet "Daily Report" and a hidden one "validations". Thank you for your giving this a try.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    Try the attached file. Run the macro in Module1. Please note that in the Time column for Productivity/Downtime in the Daily Report sheet, I entered 0 in all the blank cells. Those cells must not be blank.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-27-2022
    Location
    MS, USA
    MS-Off Ver
    Microsoft 365
    Posts
    143

    Re: Copy rows from worksheet to different worksheets based on row range

    You are amazing! This is going to help me out greatly! One last request for guidance, is how to get the copied data to not transfer the format of the "Daily Report" worksheet, and just the values. If you are busy I understand and am grateful of the position you are already got me at. Thank you

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    Give me a few minutes.

  9. #9
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    Replace the previous macro with this one:
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    03-27-2022
    Location
    MS, USA
    MS-Off Ver
    Microsoft 365
    Posts
    143

    Re: Copy rows from worksheet to different worksheets based on row range

    Thank you Mumps1

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Copy rows from worksheet to different worksheets based on row range

    You are very welcome.

+ 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] Copy Range of Data from multiple worksheets into one worksheet (II)
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-15-2020, 12:00 PM
  2. [SOLVED] Loop worksheets Copy range and Paste in LastUsedCell in first worksheet, delete Worksheet
    By Simone Fick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2017, 10:01 AM
  3. Macro to copy rows from multiple worksheets based on criteria in range
    By guidovdn in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-14-2013, 01:21 PM
  4. Macro copy data range from individual worksheets to new rows in consolidated worksheet
    By bushpotato in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 01:24 AM
  5. copy rows from different worksheets into one worksheet
    By vyvek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2011, 03:16 PM
  6. copy rows from different worksheets into one worksheet
    By vyvek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2011, 12:23 AM
  7. [SOLVED] copy nonblank rows from many worksheets and paste them onto one worksheet
    By starman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2006, 07:21 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