index match with multiple criteria

valmir

Board Regular
Joined
Feb 10, 2021
Messages
235
Office Version
  1. 365
Platform
  1. Windows
Dear Sirs
I don't know if what I am looking for has a specific name but googling my title, I had dozens of examples of formulas but none of them is even close to what I'm looking for. So, when that happens, I wonder if it is even possible.
This formula is working great!
=INDEX(INDIRECT($A30&"!$R$2:$FK$51");50;MATCH("S1";INDIRECT($A30&"!$R$2:$FK$2");0))
Problem is, I can have as lookup value, either S1 or S2, meaning when the value is S1, of course the formula works and when it is S2, obviously it doesn't. My question is:
Can I have the formula to look for both S1 and S2, instead of just for S1?
That's the first request.
Can it also be modified for 4 values? For example Q1, Q2, Q3 and Q4?
Thanks!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Not sure what you mean by "both".. Both at the same time????

=INDEX(INDIRECT($A30&"!$R$2:$FK$51");50;MATCH(A1;INDIRECT($A30&"!$R$2:$FK$2");0))

where A1 contains S1 or S2, or Q1 or.....
 
Upvote 0
Not sure what you mean by "both".. Both at the same time????

=INDEX(INDIRECT($A30&"!$R$2:$FK$51");50;MATCH(A1;INDIRECT($A30&"!$R$2:$FK$2");0))

where A1 contains S1 or S2, or Q1 or.....
No! I can have only one of the two. It will be either S1 or S2. In the other case, I may have only one of Q1 to Q4, i.e. (Q1, Q2, Q3, Q4)
 
Upvote 0
So, try the formula suggested.
Sorry, this formula doesn't work because I have to include the lookup values in the formula, not a reference cell, because I can't have for example S1 and S2 in a single cell. I hope my explanation makes sense...
 
Upvote 0
Can you please help me with another formula, instead?
The lookup value is in cell H8 (exact match)
The formula needs to lookup for this value in the range R2:FK2
Based on the match found in R2:FK2, formula needs to return the corresponding column value in the range R51:FK51
Thanks!
 
Upvote 0
Can you please help me with another formula, instead?
The lookup value is in cell H8 (exact match)
The formula needs to lookup for this value in the range R2:FK2
Based on the match found in R2:FK2, formula needs to return the corresponding column value in the range R51:FK51
Thanks!
I found a solution! :)
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,068
Members
449,091
Latest member
remmuS24

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