Minami
Minami

Reputation: 23

Excel combination of of values to return a specific value in a separate column

I'm trying to play around with Excel, and came across this issue.

    A       B        C
1  red    blue    purple
2  black  white   grey
3  red    white   pink

I want to return a specific string value in column C for each combination of values in column A and B. For example, if I have red for column A and blue for column B, I want to make my formula so that it returns "purple".

Does anyone have a clue what my formula would look like to achieve this? I'm thinking of using an IF statement, but not sure how to go from there.

Thank you so much!

Upvotes: 1

Views: 94

Answers (1)

Forward Ed
Forward Ed

Reputation: 9874

In C1 place the following:

=IF(AND(A1="red",B1="blue"),"Purple","not the combination I was looking for")

IF Statement and AND logical operator are your friends here.

Upvotes: 1

Related Questions