Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi and thanks for the help. I am using Excel 2003. I have a spreadsheet with
about 200 rows and 5 columns of data. There are numerous rows that hold subtotals. I need to sort based on the subtotals--BUT keep all the rows together that belong with that subtotal. Is that possible?? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I can be done with a custom macro. The macro would need find the continuous
rows associated with each subtotal. The swap the two groups. It would be a bubble sort routine which swaps multiple rows of data. the general form of a buble sort is for i = 1 to (lastrow - 1) For j = (i + 1) to lastrow if (subtotal_blocki subtotal_blockj) then temp_block = blocki blocki = blockj blockj =temp_block end if next j next i the block sizes may not be the same number of rows, do instead of swapping some combination of .copy, .insert.entirerow, and .delete.entirerow would be used. "SheriTingle" wrote: Hi and thanks for the help. I am using Excel 2003. I have a spreadsheet with about 200 rows and 5 columns of data. There are numerous rows that hold subtotals. I need to sort based on the subtotals--BUT keep all the rows together that belong with that subtotal. Is that possible?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Subtotals: Nested subtotals below higher subtotal | Excel Discussion (Misc queries) | |||
How do I save & apply sorts subtotals in excel to new worksheets? | Excel Discussion (Misc queries) | |||
How do I copy an outline w/ subtotals & paste just the subtotals | Excel Discussion (Misc queries) | |||
Problem with nested subtotals, placing secondary subtotals BELOW . | Excel Discussion (Misc queries) | |||
Excel gets subtotals out of order using multiple sorts and subtot. | Excel Discussion (Misc queries) |