How do I write the IF function to reflect the result in one cell?

A

AMBO

I want to yield in the 1st cell "William" when I choose "Grocery" in another
cell and "MT" in the other. And 2nd cell "Ronald" when I choose "D&F" in
another cell and "RM" in the other.

How do I write the IF and AND function for the situation mentioned above?
 
T

Trevor Shuttleworth

A1:
=IF(AND(B1="Grocery",C1="MT"),"William",IF(AND(B1="D&F",C1="RM"),"Ronald","")

Regards

Trevor
 
R

RS

Dear AMBO,

With "Grocery" & "MT" being in 2 separate columns and the result being
William, would "Ronald" & "D&F" appear in those same 2 columns or would they
be in different columns (in other words would there be 4 separate columns of
criteria)? Also, do you want William and Ronald to appear in 2 separate
cells depending on the criteria, or do you simply want the same cell to
either display William or Ronald depending on those criteria?
 
R

RS

Dear Trevor,

This is unrelated to this post but I don't know how else to get in
touch with you. I had posted a question in the Excel forums yesterday
regarding "How do I count frequency based on 2 criteria (including month)."
You helped answer part of my question but I had posted another question to
you in the same post. If you could please look at the thread and post your
answer that would be great. The thread url is:

http://www.microsoft.com/office/com...70db&mid=a3be3b91-af0a-419c-ae0f-f6f7d2f3b9b3

Thanks again for your assistance.
 
R

RS

Dear Roger & Trevor,

I replied in the original thread also but I'll post here just in case
you don't look at the original thread. Thanks to both of you for all your
help!
 
R

Roger Govier

Hi

Thank you for your response. You are more than welcome.
I'm sure I speak for Trevor as well.
 
T

Trevor Shuttleworth

Roger does indeed speak for me ... you are very welcome. Thanks for letting
us know that we were able to help.

I generally use "Show Replies to my Messages" to track posts that I have
replied to so I would see your response ... but thanks for the belt and
braces.

Regards

Trevor
 
Top