Looking for help with a sorting macro.
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.
|