Best formula for required result

Marvo

Board Regular
Joined
Nov 27, 2023
Messages
155
Office Version
  1. 2021
Platform
  1. Windows
Hi, I'm looking for the best formula to achieve the required result.

I've made a simple mock up. What I want is a formula in D11 to find the highest score of handicappers 18 and under. Then in D12 the highest score of handicappers 19+. If possible if there are more than one winner in each category, I'd like a return of zero or "".

Many thanks.
 

Attachments

  • sAMPLE.JPG
    sAMPLE.JPG
    16.8 KB · Views: 5

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
how about
=IF(COUNTIFS(C2:C8,MINIFS(C2:C8,C2:C8,"<="&18))>1,0,INDEX(B2:B8,MATCH(MINIFS(C2:C8,C2:C8,"<="&18),C2:C8,0)))
and
=IF(COUNTIFS(C2:C8,MAXIFS(C2:C8,C2:C8,">"&18))>1,0,INDEX(B2:B8,MATCH(MAXIFS(C2:C8,C2:C8,">"&18),C2:C8,0)))

Book2
ABCD
1
2Jim64
3Dave133
4Jack222
5terry183
6bob364
7frank272
8john173
9
1018 & BelowJim
11above 18bob
Sheet1
Cell Formulas
RangeFormula
D10D10=IF(COUNTIFS(C2:C8,MINIFS(C2:C8,C2:C8,"<="&18))>1,0,INDEX(B2:B8,MATCH(MINIFS(C2:C8,C2:C8,"<="&18),C2:C8,0)))
D11D11=IF(COUNTIFS(C2:C8,MAXIFS(C2:C8,C2:C8,">"&18))>1,0,INDEX(B2:B8,MATCH(MAXIFS(C2:C8,C2:C8,">"&18),C2:C8,0)))
 
Upvote 0
Another option
Excel Formula:
=LET(f,SORT(FILTER(B2:D10,C2:C10<=18),3,-1),p,INDEX(f,,3),IF(LARGE(p,1)=LARGE(p,2),"",INDEX(f,1,1)))
and
Excel Formula:
=LET(f,SORT(FILTER(B2:D10,C2:C10>18),3,-1),p,INDEX(f,,3),IF(LARGE(p,1)=LARGE(p,2),"",INDEX(f,1,1)))
 
Upvote 0
I'm struggling with both guys when I move them over to the main workbook.

In etaf's solution, where in the formula does it refer to column D (the points score)?
When the formula is entered to the workbook it produces an incorrect result but there is no data in the points column so I don't know why it should?

In Fluffs solution, the actual rows being used are B, C & E so I don't know how to change the B2:D10 to B2:E2 without it including C.

Would it help if I gave the actual columns and rows with cell numbers?

The players names are in B4:B61. The handicaps are in C4:C61. The points scores are in E4:E61.
 
Upvote 0
i dont , sorry , my mistake -

yes , real example of the data and how setout will help a lot , rather than a mock up thats not the same formatting/layout -

i'll leave with fluff for now, as i was just working on his solution to see how it worked and noticed the D column and my mis-reading the requirement
 
Upvote 0
How about
Excel Formula:
=LET(f,SORT(FILTER(B4:E61,C4:C61<=18),4,-1),p,INDEX(f,,4),IF(LARGE(p,1)=LARGE(p,2),"",INDEX(f,1,1)))
 
Upvote 0
It's coming back with a #NUM! error.

This is my actual formula. The data is on a different sheet, is that where the problem lies?

=LET(f,SORT(FILTER(' Master'!$B$4:$E$61,' Master'!$C$4:$C$61<=18),4,-1),p,INDEX(f,,4),IF(LARGE(p,1)=LARGE(p,2),"",INDEX(f,1,1)))

I'm sorry I don't know what the f and the p refer to.
 
Upvote 0
Do you have at least two players with a handicap of <=18?
 
Upvote 0
In that case do you have any #num errors in any of those ranges?
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,953
Members
449,095
Latest member
nmaske

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