Match and Tables

J

jkr

Can anybody tell me what to do:

I have a calculated table {=TABLE(B6,C6)} in cells C22:H33 and use
this formula:

=MATCH(MAX(C22:H33),C22:H33) but it alwys returns N/A.

Is there another way to get the row number for the cell, containing
the maximum value?

Jan
 
V

vezerid

MATCH only operates on 1D vectors. C22:H33 is 2D.

=SUMPRODUCT((ROW(C22:H33)-ROW(C22)+1)*(C22:H33=MAX(C22:H33)))

This formula will work correctly only if MAX will appear only once in
the data.

HTH
Kostis Vezerides
 
A

Ashish Mathur

Hi,

Assuming this is the data in the range D5:E10

1 45
2 67
3 878
10 12
5 23
6 1

In F5, enter the following array formula
=IF(OR(D5:E5=MAX($D$5:$E$10)),MAX(D5:E5),""). Copy this formula down to
F10.

IN cell F12, enter the following formula
=MATCH(MAX(D5:E10),F5:F10,0)+COUNTBLANK($F$1:F4)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
J

Jan Kronsell

I used versrid's formula, but thanks anywe

Ashish said:
Hi,

Assuming this is the data in the range D5:E10

1 45
2 67
3 878
10 12
5 23
6 1

In F5, enter the following array formula
=IF(OR(D5:E5=MAX($D$5:$E$10)),MAX(D5:E5),""). Copy this formula down
to F10.

IN cell F12, enter the following formula
=MATCH(MAX(D5:E10),F5:F10,0)+COUNTBLANK($F$1:F4)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top