Instance of match?

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
921
Office Version
  1. 365
Platform
  1. Windows
I have this
A1 = Me
A2 = You
A3 = Her
B1 = 4
B2 = 4
B3 = 5

I want automatic order of those somewhere. So I have

E1 = LARGE(B1:B3,1)
E2 = LARGE(B1:B3,2)
E3 = LARGE(B1:B3,3)
D1 = INDEX($A$1:$B$1;MATCH(E1;$B$1:$B$3;0);1)
D2 = INDEX($A$1:$B$2;MATCH(E2;$B$1:$B$3;0);1)
D3 = INDEX($A$1:$B$3;MATCH(E3;$B$1:$B$3;0);1)

But that doesn't work because B1 = B2 => Match returns the same. How do I say take the 1st match or 2nd match without knowing how many there are in advance? Do I need to go by countif and if so, then what?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
In E1 just enter and copy down:

=IF(ROWS($E$1:E1)>COUNT($B$1:$B$3),"",LARGE($B$1:$B$3,ROWS($E$1:E1)))

In D1 control+shift+enter, not just enter, and copy down:

=IF($E1="","",INDEX($A$1:$A$3,SMALL(IF($B$1:$B$3=$E1,ROW($A$1:$A$3)-ROW($A$1)+1),COUNTIFS($E$1:E1,E1))))
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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