+ Reply to Thread
Results 1 to 10 of 10

Copy selected data to multiple worksheets when certain criteria in a row is met

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    Harare, Zimbabwe
    MS-Off Ver
    Excel 2007
    Posts
    7

    Copy selected data to multiple worksheets when certain criteria in a row is met

    I have attached a file called "Sample data"

    In this file there are sheets " All Data, A, B, ..., to F"

    What I would like is a macro to select from the "All data" sheet data with specific Class name to be copied into the the relevant sheet then follow on for all classes. Also to clear existing data in the sheets. The Classes are A, B, ..., F and are in column D of the "All Data" sheet.

    Kindly note that different Classes have particular columns that are needed, for example:
    A: only copy Name, Gender, Age, Class and Region
    F: only copy Name, Class Region, Color, Height and Date joined.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    HI
    Try this code (not tested)
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-02-2012
    Location
    Harare, Zimbabwe
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Thanks for your help. However, the code is not running. Please see attached spreadsheet.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Hi
    I see
    Give this code a try
    Please Login or Register  to view this content.
    Let me Know If you have any thing regarding the code
    Thanks
    Last edited by mohadin; 10-01-2019 at 12:05 AM.

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,533

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    My take on this one...
    Please Login or Register  to view this content.
    Last edited by Sintek; 10-01-2019 at 02:09 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  6. #6
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Quote Originally Posted by sintek View Post
    My take on this one...
    Please Login or Register  to view this content.
    Brilliant, to be honest I love it,well done
    Best regards

  7. #7
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,533

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    @ mohadin...Thanks

  8. #8
    Registered User
    Join Date
    11-02-2012
    Location
    Harare, Zimbabwe
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Well done and thank you very much Sintek, it worked. I appreciate it!

  9. #9
    Registered User
    Join Date
    11-02-2012
    Location
    Harare, Zimbabwe
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Thank you Mohadin for giving this a go. You made it easier for me!

  10. #10
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,533

    Re: Copy selected data to multiple worksheets when certain criteria in a row is met

    Pleasure...Tx for rep +

+ 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. Replies: 3
    Last Post: 08-13-2019, 06:03 AM
  2. [SOLVED] Copy rows from multiple worksheets with multiple criteria - greater than dynamic values
    By stackout in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-03-2015, 04:36 PM
  3. Copy & Paste Data from Selected Worksheets to One Worksheet
    By wmetz1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 09:11 PM
  4. [SOLVED] Copy column data from multiple worksheets to single worksheet based on header criteria
    By nateaskins in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-21-2014, 10:42 AM
  5. Replies: 2
    Last Post: 05-01-2013, 05:37 AM
  6. [SOLVED] Copy data across multiple worksheets (based on three criteria)
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-17-2012, 12:53 AM
  7. copy selected range from multiple workbooks into multiple worksheets in one workbook
    By novak100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2012, 05:52 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