Posted to microsoft.public.excel.worksheet.functions
|
|
MAX, IF statements?
What about the column G value?
Shouldn't someone with a higher column G value be listed first if they also
have the highest column J value?
Column E Column G Column J
Bell, Charlie 48 .450
Davis, Johnny 34 .500
Smith, Tom 22 .335
Williams, Bill 56 .450
McElroy, Mike 62 .210
Biff
"Max" wrote in message
...
One way to get it up in descending & ascending order
which caters for the possibility of ties/multiple ties in the col J values
---- "MAX" -------
Auto-listing names from col E in descending order by col J values
(only for names with col G values =48)
In K1:
=IF(G1="","",IF(G1=48,J1-ROW()/10^10,""))
In L1:
=IF(ROW()COUNT(K:K),"",INDEX(E:E,MATCH(LARGE(K:K, ROW()),K:K,0)))
Select K1:L1, fill down to cover the max expected extent of source data.
Hide away col K. Col L returns the full list of names, neatly bunched at
the
top. Names with tied col J values will be listed in the same relative
order
that they appear within the source data.
------- "MIN" -------
Auto-listing names from col E in ascending order by col J values
(only for names with col G values =48)
In N1:
=IF(G1="","",IF(G1=48,J1+ROW()/10^10,""))
In O1:
=IF(ROW()COUNT(N:N),"",INDEX(E:E,MATCH(SMALL(N:N, ROW()),N:N,0)))
Select N1:O1, fill down to cover the max expected extent of source data.
Hide away col N. Col O returns the full list of names, neatly bunched at
the
top. Names with tied col J values will be listed in the same relative
order
that they appear within the source data.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"bob" wrote:
That works except when two values in column J are equally the largest. In
that case, the formula ignores the 48 qualifier and displays the name
that
corresponds to the first of the largest values.
Another issue is that in some cases I need to display the name based on
the
lowest value in column J, but when I substitute MIN for MAX, the formula
again ignores the 48 qualifier and goes to the first lowest value in
the
column
|