"IF" functions with multiple possible results

  • Thread starter Thread starter tommy20
  • Start date Start date
T

tommy20

Hello all!

I hope I can explain this clearly! I need a formula to return a number
based on a chart (not a formula). For example:

Chart
Y
X A B
1 3 4
2 4 5
3 4 5
4 5 6
5 5 6
6 5 6
7 5 6
8 4 5
9 4 5
10 3 4

If X=A and Y=7, then value =5
If X=B and Y=7, then value =6

Clear as mud?

Any help is appreciated!

-Tommy
 
I think you are after something like the following:-

With your X Value cell named X_Val
and Y value cell named Y_Val
and your table exactly as depicted by yourself in terms of how many columns (ie
3 consecutive columns) named MyTable

=VLOOKUP(Y_Val,MyTable,4-MATCH(X_Val,VLOOKUP(Y_Val,MyTable,{2,3},0),0),0)

array entered using CTRL+SHIFT+ENTER
 
Back
Top