Help how to get cell text based on highest number

krllb

New Member
Joined
Jun 10, 2013
Messages
16
Hi Excel Gurus,

Need help how to get expected value (ex. Ross), where entered value = 123.
Logic is when I enter serial value = 123, it will get the name based from highest value (Repeat Serial) which is 5.
Hope you can help me out and thanks in advance.

1697016487029.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
one way

Book1
ABCDE
11123Name1
22123Name2123Name6
33123Name3
44123Name4
55123Name5
66123Name6
71321Name7
82321Name8
Sheet1
Cell Formulas
RangeFormula
E2E2=INDEX(C1:C8,MATCH(MAXIFS(A1:A8,B1:B8,D2)&"-"&D2,A1:A8&"-"&B1:B8,0))
 
Upvote 0
Is this what you wanted?
=INDEX(C2:C9,MATCH(TRUE,(B2:B9=E2),(MAX(A2:A9))))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Is this what you wanted?
=INDEX(C2:C9,MATCH(TRUE,(B2:B9=E2),(MAX(A2:A9))))

Hi

Could you please explain within the MATCH function how the first criteria (TRUE) works please. (Was expecting to see a reference to a cell here)

Thanks
 
Upvote 0
So what the TRUE is doing in MATCH is that MATCH will now step through (B2:B9=E2) and (MAX(A2:A9) and when both are TRUE it returns the row (5) . This value is fed in to INDEX so it moves that number along in the range its given C2:C9, so C6 and return that cells value.
 
Upvote 0
Thank you for explaining, I had no idea you could put another function in the match_type part of the formula. I thought only TRUE or FLASE could be entered here...

1697028863738.png
 
Upvote 0
Not sure how many levels of functions in functions you can have. Not sure I have hit a limit yet.
 
Upvote 0
So I could put a vlookup in the match type? (not saying I would need to but just to highlight as a point)

I was looking at your formula yesterday and just a minor point, noted that if a number was put in that wasn't in the list it would still return a value. (not a criticism of your formula in anyway)

The OP hasn't come back to any of the replies but just letting you know
 
Upvote 0

Forum statistics

Threads
1,216,496
Messages
6,130,982
Members
449,611
Latest member
Bushra

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