Index/Match Help

nymyth

Board Regular
Joined
Mar 4, 2010
Messages
104
Hi all, I need some help regarding Index/Match as I'm not sure why this isn't working.

ABC
1JanFebMar
230.240.260.0
35.415.190.1
430.140.550.3

<tbody>
</tbody>

in the table above, I want to output which Month has the largest value (so in this case, my output should read Mar)
this is my current formula =index(A1:C1,Match(large(A1:C4,1),A2:C4,1)) - however this gives me an error. If I limit my array to A3:C3 it works fine. Any help is appreciated.

Thanks.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Try the Array Formula below:

In D2 - use Ctrl+Shift+Enter to enter the formula

=INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4=MAX($A$2:$C$4),COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

Markmzz
 
Upvote 0
Thank you Markmzz - so why do I have to do it via an array? Also, what if I wanted in a different cell to show the 2nd largest and in another cell the 3rd largest?
 
Upvote 0
Thank you Markmzz - so why do I have to do it via an array? Also, what if I wanted in a different cell to show the 2nd largest and in another cell the 3rd largest?

In this case, try this:

In D2 - use Ctrl+Shift+Enter to enter the formula

=INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4-COLUMN($A$1:$C$1)/10^6=LARGE($A$2:$C$4-COLUMN($A$1:$C$1)/10^6,1),COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

Markmzz
 
Upvote 0
Thanks, went an easier route. Essentially in D2 I added =large (A2:C2,1), then in D3 I did =INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4=$D$2,COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

Then in E2 I added =large(A2:C2,2) and in E3 =INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4=$E$2,COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

This did the trick, so thanks again.
 
Upvote 0
Thanks, went an easier route. Essentially in D2 I added =large (A2:C2,1), then in D3 I did =INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4=$D$2,COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

Then in E2 I added =large(A2:C2,2) and in E3=INDEX($A$1:$C$1,SMALL(IF($A$2:$C$4=$E$2,COLUMN($A$1:$C$1)-COLUMN($A$1)+1),1))

This did the trick, so thanks again.

And if you have this?

JanFebMarResult1Result2
30,240,260,0FebMar
5,490,190,1

30,140,550,3

<tbody>
</tbody>

Markmzz
 
Last edited:
Upvote 0
haha, fair enough (didnt consider that) but the size of the numbers are 9 digits and there is not a chance that 2 numbers will end up alike. I have kept your copy of your formula so I can try to break it down and understand it. Thanks.
 
Upvote 0
haha, fair enough (didnt consider that) but the size of the numbers are 9 digits and there is not a chance that 2 numbers will end up alike. I have kept your copy of your formula so I can try to break it down and understand it. Thanks.

You are welcome and thanks for the return.

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top