Multiple criteria lookup

Excel1991

Board Regular
Joined
Aug 1, 2018
Messages
58
Specialty

Category
25th
median
A
spoon
1000
1500
A
fork
2000
300
A
knife
8000
1000
B
spoon
5100
2000
B
fork
6100
3000

B
knife
7100
4000


<tbody>
</tbody>


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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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