Returning a value in a table

Cdshep15

New Member
Joined
Feb 24, 2006
Messages
35
I would like to have a cell that would return a certain value based on what is entered in another cell.

Example...

If cell A1 = "yes" and cell B1 = "sir" then D1 would display "great"

but if cell A1 = "no" and cell B1 = "ma'am" then D1 would display "poor"

I have a table of all possible combinations in another part of the worksheet. Each combination of yes, no in A1 and great, poor in B1 would yield a different outcome that is listed in the table. I'm trying to use something like this....

=IF((AND(A1=F3:F61,B1=G3:G61)),H3:H61,"look it up")

the "look it up" part just means that the combo is not valid. Help would be much appreciated.

Thanks!!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,887
Hi Cdshep15

A solution is to look for the concatenation of the 2 values.

Please try:

Code:
=IF(ISNUMBER(MATCH(A1&B1,F3:F61&G3:G61,0)),INDEX(H3:H61,MATCH(A1&B1,F3:F61&G3:G61,0)),"Look it up")
This is an array formula and so MUST be entered with CTRL+SHIFT+ENTER and not just ENTER.

Hope this helps
PGC
 

Forum statistics

Threads
1,176,623
Messages
5,904,081
Members
435,070
Latest member
cakes are yummy

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
Top