Index, Match, Offset, I'm lost?

Upex

Board Regular
Joined
Dec 29, 2010
Messages
186
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Hope you're safe and well.

Struggling to get the old brain to figure this one out and wonder if there any ideas please?

Need to find a chosen date within a row range say c1:h1

then find the X largest number within that respective column , say within rows 2:10 (1st 2nd largest etc will be hard coded not user selected, 1st will be used in one location, 2nd another - so presume using large vs max is the solution there)

then return the text from column A for that same row.

Pic attached of rough example - if select 3/10/22 as the date (and looking for 1st largest) the column A return would be Test 3, column B would be A. 2nd largest would offer Test 2 and then B etc.

Need it to be formula not VBA and running O365 if it makes any odds.

Thanks All
 

Attachments

  • EG.PNG
    EG.PNG
    22.7 KB · Views: 8

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
running O365
You might want to updtae your profile to show this.


How about
Excel Formula:
=LET(f,FILTER($C$2:$G$10,$C$1:$G$1=$B$14),INDEX($A$2:$B$10,MATCH(LARGE(f,{1;2}),f,0),{1,2}))
 
Upvote 0
Solution
Thanks Fluff - will try to locate profile amend and update, can't seem to see it at first pass (must not be having a good day!)

Thanks for the formula, never seen that before but seems to be working, will have a play about and see what I can learn, thank you and many thanks for posting it for me.

By chance, if I then want to add the actual result as a third column, is that an easy append to this one or need a separate formula - index and match against the name and date or such like.
 
Upvote 0
Neither come up Fluff, but no worries, I can grab those easily enough, just didn't know if there was a very easy way to embed within your solution.
Many thanks for your spot on help, much appreciated :)
 
Upvote 0
It can still be done with them, but just a bit longer.
Excel Formula:
=LET(f,FILTER($C$2:$G$10,$C$1:$G$1=$B$14),m,LARGE(f,{1;2}),a,INDEX($A$2:$B$10,MATCH(LARGE(f,{1;2}),f,0),{1,2}),CHOOSE({1,2,3},a,a,m))
 
Upvote 0
works like a charm, Many thanks Fluff - Second solution definitely above
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
Hey Fluff, all,

Sorry to resurrect this one, but having used it a bit, I now find it doesn't like when a result is duplicated / tied for position:

1666626738175.png

for example, looking at date 2 within above, it's showing the top three results as the highest (first occurrence) duplicated 3 times, 2-2-2 rather than the three different results which all tied for first 2-4-8

Is there anyway to stop that and display the 2-4-8?

Thanks, Upex
 
Upvote 0
Maybe
Excel Formula:
=LET(f,FILTER($C$2:$G$10,$C$1:$G$1=$B$14),m,LARGE(f,{1;2}),a,FILTER($A$2:$B$10,ISNUMBER(MATCH(f,m,0))),CHOOSE({1,2,3},a,a,m))
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,962
Latest member
Fenes

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