+ Reply to Thread
Results 1 to 12 of 12

database to group

  1. #1
    Registered User
    Join Date
    07-17-2006
    Posts
    54

    database to group

    Hi,

    I have a big database that has different name in column A(something like Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8...). What i'm trying to do is to group them! In group A i have Y1,Y7, in group B i have Y2,Y3, in group C i have Y4, Y6 and etc! I think the solution is something like index...but i never worked with that in VBA! So each name of group A should copy on a new sheet, the next rows should come group B and etc! Is there a way to do that in VBA??

    Thanks

  2. #2
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    no one know how to do it?

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I don't think anyone understands what you want. I certainly don't. What determines a group?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    i thought i explained that. Well there is nothing that determine the group, so that's why i thought the solution would be to work with an index(in column A the names, in column B the group for each names). It looks like that : http://www.ozgrid.com/News/excel-subtotal-dynamic.htm(Grouping data onto individual sheets). But what i want is that the data go in order on the same sheet! Is that more clear?

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    In the attached file there is an example of how you can group data... I hope it can help.

    Regards,
    Antonio
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    really nice, the code is nice too! but i've tried to make it works for what i have, and it didnt work! So i'm posting the file with the exact same sheet i have and that i need!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    oh yeah about the zeros and blank, they have to appear on the sheet FinaL!

  8. #8
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    In the attached file I added a command button in your 'Data' sheet.
    The output goes in 'Final.' sheet.

    Regards,
    Antonio
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    big thank you to you!!!! it's really helping me! i'm trying to understand and to change your macro to fit what i have!! Maybe i will need your help again hehe :P! thanks again!
    Maxime

  10. #10
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    the problem i have right now is that my groups are not numbers but names(ex: group 1 is called Orange, group 2 is called apple...)! So i get no values for mingroup and maxgroup. The second problem is that i have 3 values for each Date. I'm trying to find how to solve the problems!

  11. #11
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    See the attached I modifiied to work with not numeric groups.

    Regards,
    Antonio
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    07-17-2006
    Posts
    54
    big thanks to you!!!!! that macro is working great!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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