How do I handle a tie in an index/match function

dugmic

New Member
Joined
Apr 20, 2006
Messages
10
I have a fairly simple index/ match situation where I have a range with names and then corresponding sales totals. I am trying to come up with a way to automatically sort and rank them accordingly. So the Large formula works great for putting the data in descending order, and my indexand match formula works great to match the name with the corresponding sales figure. What I can't figure out is how do I handle when two or more people have the same sales amount. My formula wants to put the firs name it finds in all three spots. Does that make sense?

Thanks

Mike
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I have a fairly simple index/ match situation where I have a range with names and then corresponding sales totals. I am trying to come up with a way to automatically sort and rank them accordingly. So the Large formula works great for putting the data in descending order, and my indexand match formula works great to match the name with the corresponding sales figure. What I can't figure out is how do I handle when two or more people have the same sales amount. My formula wants to put the firs name it finds in all three spots. Does that make sense?

Thanks

Mike
Are you doing a lookup on a rank?

Can you post some data so we can see what you have to work with?
 
Upvote 0
I believe I am trying to do a lookup on a rank.

The values formula right now is - =LARGE(allteams,1), =LARGE(allteams,2), etc. all the way down.
My associating name formula now is - =INDEX(test1,MATCH(N12,test2,0))

Hopefully that helps a little.

George 1925
Alex 1631
Taylor 1300
Sean 1045
Martin 950
Jon 915
Andrew 810
Kim 782.5
Brian 720
Brian 720
Jose 637.5
Colin 562.5
Andrea 550
Alejo 525
Alexandra 500
Krystal 420
Benjamin 390
Chanel 325
Mona 195
Diego 175
Diego 175
Joe 137.5
Fernando 125
Fernando 125
Sue 0
Sue 0


Sean $1,045.00 Names are in the range named Test1, values in range name test2
Brian $720.00
Martin $950.00
Colin $562.50
Kim $782.50
Sue $0.00
Jose $637.50
Andrew $810.00
Andrea $550.00
Alexandra $500.00
Fernando $125.00
Joe $137.50
George $1,925.00
Taylor $1,300.00
Alejo $525.00
Diego $175.00
John $175.00
Tammy $720.00
Jon $915.00
Alex $1,631.00
Conor $125.00
Mona $195.00
Ben $0.00
Krystal $420.00
Chanel $325.00
Benjamin $390.00
 
Upvote 0
I believe I am trying to do a lookup on a rank.

The values formula right now is - =LARGE(allteams,1), =LARGE(allteams,2), etc. all the way down.
My associating name formula now is - =INDEX(test1,MATCH(N12,test2,0))

Hopefully that helps a little.

George 1925
Alex 1631
Taylor 1300
Sean 1045
Martin 950
Jon 915
Andrew 810
Kim 782.5
Brian 720
Brian 720
Jose 637.5
Colin 562.5
Andrea 550
Alejo 525
Alexandra 500
Krystal 420
Benjamin 390
Chanel 325
Mona 195
Diego 175
Diego 175
Joe 137.5
Fernando 125
Fernando 125
Sue 0
Sue 0


Sean $1,045.00 Names are in the range named Test1, values in range name test2
Brian $720.00
Martin $950.00
Colin $562.50
Kim $782.50
Sue $0.00
Jose $637.50
Andrew $810.00
Andrea $550.00
Alexandra $500.00
Fernando $125.00
Joe $137.50
George $1,925.00
Taylor $1,300.00
Alejo $525.00
Diego $175.00
John $175.00
Tammy $720.00
Jon $915.00
Alex $1,631.00
Conor $125.00
Mona $195.00
Ben $0.00
Krystal $420.00
Chanel $325.00
Benjamin $390.00
Try this...

Book1
ABCDEF
2Sean$1,045.004_George$1,925.00
3Brian$720.009_Alex$1,631.00
4Martin$950.005_Taylor$1,300.00
5Colin$562.5012_Sean$1,045.00
6Kim$782.508_Martin$950.00
7Sue$0.0025_Jon$915.00
8Jose$637.5011_Andrew$810.00
9Andrew$810.007_Kim$782.50
10Andrea$550.0013_Brian$720.00
11Alexandra$500.0015_Tammy$720.00
12Fernando$125.0023_Jose$637.50
13Joe$137.5022_Colin$562.50
14George$1,925.001_Andrea$550.00
15Taylor$1,300.003_Alejo$525.00
16Alejo$525.0014_Alexandra$500.00
17Diego$175.0020_Krystal$420.00
18John$175.0021_Benjamin$390.00
19Tammy$720.0010_Chanel$325.00
20Jon$915.006_Mona$195.00
21Alex$1,631.002_Diego$175.00
22Conor$125.0024_John$175.00
23Mona$195.0019_Joe$137.50
24Ben$0.0026_Fernando$125.00
25Krystal$420.0016_Conor$125.00
26Chanel$325.0018_Sue$0.00
27Benjamin$390.0017_Ben$0.00
Sheet1

Enter this formula in C2 and copy down to the end of data. This will return a unique rank for each numeric value in column B.

=RANK(B2,B$2:B$27)+COUNTIF(B$2:B2,B2)-1

Enter this formula in E2:

=INDEX(A$2:A$27,MATCH(ROWS(E$2:E2),C$2:C$27,0))

Enter this formula in F2:

=INDEX(B$2:B$27,MATCH(E2,A$2:A$27,0))

Select both E2 and F2 then copy down to E27:F27.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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