+ Reply to Thread
Results 1 to 6 of 6

Sorted copy data in new worksheets

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Sorted copy data in new worksheets

    I should create Macro therefore I need your kind support.
    I attach a sample file for better understand.
    There is a DATA worksheet.
    The macro main aim is:
    according to the values of the column E (defB) need to copy the data by types in different sheets.
    example: all data with letter "A" has to copy to worksheet SH1 and sort them by column F and H.
    all data with letter "B" has to copy to worksheet SH2 and sort them by column F and H.
    as many different letters are in the column B that should copy to as many sheets.
    Gratis is that it could sort the data by worksheets based on column F and H.
    I appreciate your any effort in advance.
    Attached Files Attached Files
    Last edited by ccsmith; 10-16-2014 at 02:02 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Sorted copy data in new worksheets

    Hi,

    Try below code:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorted copy data in new worksheets

    'SHEET1 TO MANY SHEETS
    Here's a macro for parsing rows of data from one sheet to many sheets named for the same values in a specific column.It not only can parse the rows, it can create the sheets if they are missing. There is a sample sheet there where you can test this out.



    I've installed it into your workbook, moved the data to row1, then added the sorting.
    Attached Files Attached Files
    Last edited by JBeaucaire; 12-26-2019 at 04:53 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Sorted copy data in new worksheets

    misrasomendra:
    It is marvellous. Your prompt solution is a great salvation for me.
    Could I ask for an extra option?
    Could you add the function to clear the content before the copy just from Range("C3:H" & lr) from every sheets except DATA?
    Other cells will contain additional data.
    Last edited by ccsmith; 10-16-2014 at 02:12 PM.

  5. #5
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Sorted copy data in new worksheets

    JBeaucaire : your solution is brilliant.
    But I need to copy just Range("C3:H" & lr) from DATA to the new sheets in a different range like A1 because other rows and columns contain formats and other data.
    Could you modify your code according to this info?

  6. #6
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Sorted copy data in new worksheets

    Hi,

    Try Below Code:

    Please Login or Register  to view this content.
    And if this solved your problem than please mark the thread as SOLVED and if you feel the solution had helped you than do consider giving some reps by clicking the star of Add reputation below our comments.

+ 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] Need Rows Sorted Into New Worksheets Based on Cell Value in Certain Column
    By jclaim in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-11-2014, 05:46 PM
  2. Replies: 3
    Last Post: 10-08-2013, 02:59 PM
  3. [SOLVED] How to Automatically Copy New Data into the next sheet and have it automatically sorted??
    By ReedDOT in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-24-2013, 10:50 AM
  4. Replies: 0
    Last Post: 11-18-2005, 12:30 PM
  5. Question about deleting rows from sorted linked worksheets
    By DewChugr in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-20-2005, 04:25 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