+ Reply to Thread
Results 1 to 22 of 22

VBA code help, to get 6 set of rows from large data???

  1. #1
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    VBA code help, to get 6 set of rows from large data???

    Good evening,
    Would you mind helping me to find 60 set of 6 rows from data in sheet 1 .the expected result should be like in sheet6 there is a matrix 25x25 ,which shows how many times each number occurs with any other number ,it should be all (1) no other .in sheet 3, I put one row just to show you how the matrix look before all 6 set of rows added.the data is made of over 10k rows .
    Thanks in advance for any help.
    sem
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA code help, to get 6 set of rows from large data???

    hi sem, option, please check attachment, press Run button
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    hi watersev,
    thank you very much for your time and effort but unfortunateley that is not what i want, you done the matrix for the whole data which is
    correct.i need similar result to sheet6 like having (60x sheet6) but without repeating the same rows.
    i hope i explained myself and very sorry if i confused you
    thanks again
    sem

  4. #4
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Any suggestion please?
    Thanks
    sem

  5. #5
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Bump.....??

  6. #6
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    sorry for bumping...?

  7. #7
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    i would very much appreciate, for any help please?
    Thanks
    sem

  8. #8
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Any help please..?
    Thanks.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: VBA code help, to get 6 set of rows from large data???

    If nobody answered your post is likely unclear and you should probably provide more explanations.

  10. #10
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Exclamation Re: VBA code help, to get 6 set of rows from large data???

    Good morning Zbor,
    Thank you for your time and very much appreciate help.what I need a VB code to get 6 rows from “sheet 1” data , transposed to” column A” to get result like in “sheet 6”.and this process to be repeated 60 times.i hope I explained myself.
    Thanks again and kind regards
    sem

  11. #11
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    bump........

  12. #12
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    suggestions please ??????

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: VBA code help, to get 6 set of rows from large data???

    I gave you suggestion: provide more info. It's hard to see what are you trying to do, what is input, what output...
    Give more explanations.

    Sometimes people here write whole A4 for explanation. You gave one sentence. That could be enough but as you can see - not in your case.

  14. #14
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Hi Zbor,
    Sorry for the delay and Thank you for your time and suggestion much appreciated.
    What I need is to transpose 6 rows from “sheet1” to “sheet 3” to have all cells in” E2:AC26”(1) only
    The logic is from second rows and onward if the cells value change to “2” then delete that and choose another row until all rows values “1” I recorded a macro to give you a clue.
    Try it in sheet3 ,please.
    Please Login or Register  to view this content.
    Thanks again
    sem

  15. #15
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    any help please?

  16. #16
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Bump.........??

  17. #17
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Bump.............

  18. #18
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Bump.........??

  19. #19
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    i would very appreciate for any suggestions,please?
    Thanks

  20. #20
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA code help, to get 6 set of rows from large data???

    option, it will find combination of 30 rows dataset according to your requirement. The code will take considerable time depending on where the first occuring row will be placed. As for it's current position - row 1694 - it takes around 20 minutes. If all result rows will be the last in the data set it would take around 2 and a half hours to identify them.
    Attached Files Attached Files

  21. #21
    Forum Contributor
    Join Date
    01-21-2011
    Location
    London,UK
    MS-Off Ver
    Excel 2007
    Posts
    241

    Re: VBA code help, to get 6 set of rows from large data???

    Watersev,
    Thanks for help very much apprciated,and sorry for the delayed response.When i run your code it gives the correct result however,when i remove those rows from the data and run the code again i get the wrong result .
    but i'm happy and very greatful with your solution.
    thanks and kind regards
    sem

  22. #22
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA code help, to get 6 set of rows from large data???

    hi Sem, I've updated the code with one additional check now it should give correct results, please check attachment
    Attached Files Attached Files

+ 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