Return cell value with 1st 2nd 3rd highest corresponding using multiple conditions and excluding values from range

Chris78

New Member
Joined
Aug 11, 2017
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi there,
I'm struggling to return 1st, 2nd highest value from table using multiple conditions.
In my examle attached, I would want H4 to return 'Cow' instead of 'Pig' which is already in H3

In essence, I am trying to add a condition to avoid cells already present in range to be returned.
=INDEX(B:B,MATCH(1,($F$2=A:A)*(0=D:D)*(LARGE(FILTER(C:C,(A:A=$F$2)*(D:D=0)),$G4)=C:C),0))
1681982349417.png
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
One method - will depend on your version of Excel though, if not then i have provided the data for others to use:
Book1
ABCDEFGH
1WeekSearch PhraseSearchesAARWeekBlah Blah
22023 W15bird516562023 W151chicken
32023 W15fly654252pig
42023 W15pig45603cow
52023 W15cow4560
62023 W15bull78925
72023 W15chicken6540
82023 W15ant95185
92023 W15bear69015
102024 W16cow5360
112024 W16france48541
122024 W16england45256
132024 W16sweeden21485
142024 W16finland3560
152024 W16chicken31552
162024 W16spai54186
172024 W16italy3580
Sheet1
Cell Formulas
RangeFormula
H2:H4H2=CHOOSECOLS(TAKE(SORT(FILTER(B2:C17,(D2:D17=0)*(A2:A17=$F$2)),2,-1),3),1)
Dynamic array formulas.
 
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’)

@Georgiboy
You can shorten that slightly like
Excel Formula:
=TAKE(SORT(FILTER(B2:C17,(D2:D17=0)*(A2:A17=F2)),2,-1),3,1)
 
Upvote 0
Thanks @Fluff - I am always learning, I had forgot the fact that TAKE also has a column part... We are spoiled with all these new functions.
 
Upvote 0

Forum statistics

Threads
1,224,755
Messages
6,180,751
Members
452,996
Latest member
nelsonsix66

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