Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
Can anyone help me with a sort routine that goes through a sheet until the data in column E stops but sorts blocks of data defined by a 'Total' string in Column F and sort by column G. So to explain another way. Until data finishes in column E, look between 'Total tags in Column F and sort by column G. I done the best I can with an ilistration below, opast toa true t a b c d e f g 1 - - - - a Total 81 2 - - - - b Total 35 3 - - - - c 15 4 - - - - d 10 5 - - - - e 5 6 - - - - f Total 46 7 - - - - g 2 8 - - - - h 18 9 - - - - I 26 10 - - - - J Any help would be fantasic, I just don't know Excel well enough yet to do this. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sub SortData()
Dim rng as Range, ar as Range set rng = Range("F:F").specialCells(xlblanks) for each ar in rng.Areas ar.EntireRow.sort Key1:=ar(1).offset(0,1), _ Order1:=xlAscending, Header:=xlNo Next end sub -- Regards, Tom Ogilvy " wrote: Hello all, Can anyone help me with a sort routine that goes through a sheet until the data in column E stops but sorts blocks of data defined by a 'Total' string in Column F and sort by column G. So to explain another way. Until data finishes in column E, look between 'Total tags in Column F and sort by column G. I done the best I can with an ilistration below, opast toa true t a b c d e f g 1 - - - - a Total 81 2 - - - - b Total 35 3 - - - - c 15 4 - - - - d 10 5 - - - - e 5 6 - - - - f Total 46 7 - - - - g 2 8 - - - - h 18 9 - - - - I 26 10 - - - - J Any help would be fantasic, I just don't know Excel well enough yet to do this. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To help I've mock-up a document at "http://
www.inasentimentalmood.co.uk/Book1.xls" . From here I need to go through the 'Sections' and sort the data by the Sales Column within the section. Does anyone have suggestions on how best to approach this problem, or better still, working code. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Okay, I can use this to select the groups of data but can Excel
recognise the clusters of rows and sort each group in turn? Set myRg = Range([e10], [e65536].End(xlUp)) Set myRg = myRg.SpecialCells(xlCellTypeConstants).EntireRow.S elect |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Macro for sorting | Excel Worksheet Functions | |||
sorting using macro | Excel Discussion (Misc queries) | |||
macro for sorting | Excel Discussion (Misc queries) | |||
Sorting with a macro? | Excel Programming | |||
sorting macro | Excel Programming |