+ Reply to Thread
Results 1 to 4 of 4

sort data and move it to diferent sheets

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Medias, Romania
    MS-Off Ver
    Excel 2011
    Posts
    6

    Question sort data and move it to diferent sheets

    Dear all,

    I mannaged to find another problem and didn't find a thread to figure it out

    I have one sheet with ~10 rows and a few hundreds of lines. I need to sort lines by date, then create sheets with each date from my sheet and move entries to specific sheets.

    The biggest problem is that that number of lines varies every day , leading to different number of sheets, with diferent names, and in each sheet different number of lines.

    I will gladly accept any help

    Thank you and best regards.

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

    Re: sort data and move it to diferent sheets

    '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. You can use the column with your Dates I suppose.It not only can parse the rows, it can create the sheets if they are missing. In this base macro the sheets are named for the values in the vCol you select to use in the macro.


    There is a sample sheet there where you can test this out.
    Last edited by JBeaucaire; 12-27-2019 at 04:29 AM.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    01-09-2013
    Location
    Medias, Romania
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: sort data and move it to diferent sheets

    Thank you very much, it's a great code, with only one observation
    I have the date in format 31.10.13
    When the sheets are created, are sorted by first two letters. they are like this: 02.09.13, 03.10.13, 05.09.13, etc. instead of 02.09.13,05.09.13, 03.10.13

    Should I use another code for sorting sheets?

    Thank you

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

    Re: sort data and move it to diferent sheets

    It's a purely alphabetical sorting as is all text sorting. In the US the common date format is mm/dd/yy which means for us it sorts "correctly" even alphabetically since sorting by months then days is what we want, and sounds like what you want as well.

    In my opinion the most perfect simple date format is actually: yyyy.mm.dd

    As long as your local or desired default date format is dd.mm.yy your always going to be going the long way around the block to deal with it.

    I suppose you could add quite a bit of complexity:

    1) Temporarily change all the existing sheet tab date formats to mm.dd.yy
    2) Format the vCol in the macro to that same format
    3) Run the macro to parse the data and create sheets as needed
    4) Change the formatting of that vCol on all sheets and the tab names back to your desired dd.mm.yy format.

+ 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. from value in combo box find data in 2 diferent sheets
    By cdafonseca in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2013, 12:43 PM
  2. print values from diferent sheets
    By GHIREM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-24-2012, 12:23 PM
  3. matching Items, quantity and price from 2 diferent sheets
    By hisham_a_j in forum Excel General
    Replies: 5
    Last Post: 05-29-2012, 08:36 AM
  4. Coping 5 highest values to 5 diferent sheets.
    By Mladjone in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2011, 06:08 PM
  5. Move to diferent cell using date as reference
    By deepdiver in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 10-01-2007, 03:51 AM

Tags for this Thread

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