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 can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
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,141,624
Messages
5,707,466
Members
421,510
Latest member
haroonstr

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