"IF" functions with multiple possible results

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
 
K

Ken Wright

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top