View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Identify which column 'Large' finds a match in

Let's assume:

B1:H1 = Catx
B2:H2 = numbers

To get the corresponding Cat for LARGE(B2:H2,{1,2,3}):

Assume the first result is to appear in cell A7 then copied across to C7.

Array entered** :

=INDEX($B$1:$H$1,MATCH(LARGE($B2:$H2-COLUMN($B2:$H2)/10^10,COLUMNS($A7:A7)),$B2:$H2-COLUMN($B2:$H2)/10^10,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

When then are ties the leftmost tie will be extracted first.

--
Biff
Microsoft Excel MVP


"ker_01" wrote in message
...

I have a grid that shows categories along the top, and people down the
left.
For each person, the categories may show zero time, or increments up to
100.
I then need the "percent of time" in decending order, so I'm using
=large(array,1) followed by =large(array,2), etc. (see example, below)

Now that I have all of these values, in addition to knowing what the
percents are, I need to know which category each percent represents, so I
can
use it to color code my sheet. For example, any percents associated with
category 1 might be red, regardless of whether that category ended up as
the
largest, second largest, (etc) number.

I can't use MATCH because in some cases, I have multiple cells with the
same
value. For example:
(red) (yel) (blu) (gre) (ora) (pur) (gry)
Cat1 Cat2 Cat3 Cat4 Cat5 Cat6 Cat7 Large1
Large2 Large3 etc
Person A 0 25 50 25 0 0 0
50
25 25
Person B 25 0 25 0 0 25 25
25
25 25
Person C 10 70 0 10 10 0 0
70
10 10
Person D 0 0 0 0 30 40 30
40
30 30

I need to pull over the column info so that the final order is color coded
as the following.

Large1 Large2 Large3
blu yel gre
red blu pur
yel red gre
pur ora gry

How can I find out which cell LARGE is actually returning a value from?

Thank you,
Keith