Sorting rows of data of varying lengths
Put in an auxilary column the number of columns with data. If lap 1 starts
in column J then in row 5
=countA(J5:P5)
Then copy the formula down the column. Now sort this new column in
descending order. The new column will tell you the number of laps completed
since countA is the count of non blank cells.
"NDBC" wrote:
I think I've left the hardest question to last. See data below
H I J K L M
N O P.....
Name No lap1 lap2 lap3 lap4 lap5
lap6........
5 Name / Name 100 0:00:08
6 Name / Name 101 0:00:10 0:00:18
7 Name / Name 102 0:00:11 0:00:19 0:00:19 0:00:25 0:00:27
8 Name / Name 103 0:00:13 0:00:21 0:00:21 0:00:27 0:00:31
9 Name / Name 104 0:00:16 0:00:24 0:00:24 0:00:29 0:00:29 0:00:33
10 105
11 106
.
.
.
I need to sort the riders to determine places. The H,I.... and 5,6... are
cell references (and do not change) if that helps. The number of laps any one
rider may have completed in a race varies from 0 to unlimited. Riders are
ranked by number of laps completed and then finish time on their last lap if
number of laps is equal.
There are 2 ways to determine the number of rows for sorting that I can see.
1) determine the number of rider names till the first blank
2) just sort every rider number anyway even if unused. The maximum rider
number is 199 (row 104).
My hassle is determining the max number of columns for the range and then
sorting the rows based on what could realistically be 30 columns of times.
Thanks
|