If/and/or question

Copper Contributor


How do I write an "if" statement for column A that returns all 3 of the words consolidated if the second two are what I am looking for?


I want column A to show, tampamatthewsanders if column B is "tampa" and column C is "matthew" and column D is "sanders" but if Column D is anything other than "sanders" I want column A to read tampamatthew only.


4 Replies


If I understand fully what you want -- you didn't specify what is to happen if B2 or C2 are something other than "tampa" or "matthew" -- this formula will work. In that non-specified situation, I wrote a formula that returns blank.


@pssmatthewsanders By the way, because I used a LET function, you will need a relatively recent version of Excel for that to work.


If you don't have that new version, this will work:

I should have been more specific, sorry. Doesn't matter what B2 and C2 are, A2 should equal B2 and C2 combined. But, if B2 is tampa, C2 is matthew, and D2 is sanders, then A2 should equal all three combined.
How did the formulas I gave you work?