Multiple criteria lookup

Excel1991

Board Regular
Joined
Aug 1, 2018
Messages
58
[TABLE="width: 500"]
<tbody>[TR]
[TD]Specialty

[/TD]
[TD]Category
[/TD]
[TD]25th
[/TD]
[TD]median
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]spoon
[/TD]
[TD]1000
[/TD]
[TD]1500
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]fork
[/TD]
[TD]2000
[/TD]
[TD]300
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]knife
[/TD]
[TD]8000
[/TD]
[TD]1000
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]spoon
[/TD]
[TD]5100
[/TD]
[TD]2000
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]fork
[/TD]
[TD]6100
[/TD]
[TD]3000

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]knife
[/TD]
[TD]7100
[/TD]
[TD]4000

[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I am hoping someone can help with an array formula

I am trying to write a formula in excel that will allow me to say “if the specialty is equal to A, look in the category column and find SPOON, and then look into the median or 25th percentile column and return the value”


Essentially, the specialty column, category column and percentile columns within the formula will change based on what I need to lookup. I have a summary tab set up and im basically trying to look within a table and pull the value that is associated with those three variables. Like I said though, those variables will change (not the column headers, just the value within each column that I am looking for).

Would anyone have anyidea how to accomplish this?
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Perhaps this:

Assuming headers in row 1, data begins in row 2.

For 25th:
=INDEX(C$2:C$7,MATCH($F$2&$G$2,$A$2:$A$7&$B$2:$B$7,0))

For median:
=INDEX(D$2:D$7,MATCH($F$2&$G$2,$A$2:$A$7&$B$2:$B$7,0))

These are array formulas, entered with CTRL+SHIFT+ENTER, not just ENTER.

In the above formulas:

Col A = Specialty
Col B = Category
Col C = 25th
Col D = median

F2 contains the Specialty on your summary sheet, G2 contains the Category on your summary sheet. Adjust all references to suit your data.
 
Upvote 0
Hi,

Not sure if you mean you want Separate results for 25th and median, or you want the combined Total:


Book1
ABCDEFGHIJ
1SpecialtyCategory25thmedianSpecialtyCategory25thmediancombined
2Aspoon10001500Aspoon100015002500
3Afork2000300Bfork610030009100
4Aknife80001000
5Bspoon51002000
6Bfork61003000
7Bknife71004000
Sheet228
Cell Formulas
RangeFormula
H2=SUMIFS(C$2:C$7,A$2:A$7,F2,B$2:B$7,G2)
I2=SUMIFS(D$2:D$7,A$2:A$7,F2,B$2:B$7,G2)
J2=SUMPRODUCT((A$2:A$7=F2)*(B$2:B$7=G2)*C$2:D$7)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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