VBA needed to break the tie!

erutherford

Active Member
Joined
Dec 19, 2016
Messages
453
Over the years you folks have helped me to build a wonderful system has saved our club many hours every year at our annual concours (car show). For the first time the system didn't know what to do with a tie score.
2nd and 3rd place tied, the system showed the 2nd place finisher twice. My work around was after the tie breaker was settled, I added a point to 2nd place and then the system displayed perfectly. I would prefer it display the two that tied. Below is the code used.

VBA Code:
=INDEX(Pts,MATCH(MAX(IF(Div=A92,IF(Class=A93,Pts))),IF(Div=A92,IF(Class=A93,Pts)),0))
- This displays 1st place
Code:
=INDEX(Pts,MATCH(LARGE(IF(Div=A92,IF(Class=A93,Pts)),2),IF(Div=A92,IF(Class=A93,Pts)),0))
- This displays 2nd Place
Code:
=INDEX(Pts,MATCH(LARGE(IF(Div=A92,IF(Class=A93,Pts)),3),IF(Div=A92,IF(Class=A93,Pts)),0))
- This displays 3rd Place

I am not opposed to a MsgBox popping up saying there is a tie if that's easier.

Many thanks to everyone at MrExcel!!!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I think this is a start in the right direction.
VBA Code:
=RANK(R3,$R$2:$R$40)
I need to look for "W" in column C and a "O" in column D, then the "Rank" formula.
I'll keep searching
 
Upvote 0
It would be helpful if you provided some context and example data, preferably using XL2BB.
You know your sheet intimately, but we have no idea what is in A92, A93, the named range Pts, or in columns R, C or D.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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