1

I'd like to build a formula that will state that if Cell C5 is equal to "Core Advocate" or "Advocate" or "Current Client" and if, at the same time, cell B5 is marked as "Yes," then the result needs to be "Text", otherwise the result is "No"

1

AND() and OR() accept any number of arguments and return a Boolean value.

AND
Returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.

OR
Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.

I think this will work:

=IF(AND(OR(C5="Core Advocate",C5="Advocate",C5="Current Client"),B5="Yes"),"Text","No")

Broken down for readability:

=IF(
  AND(
    OR(C5="Core Advocate",C5="Advocate",C5="Current Client")
    ,B5="Yes"
  )
  ,"Text","No"
)

Logic (from the inside, out):

OR(C5="Core Advocate",C5="Advocate",C5="Current Client")

will return true if any of the conditions are true.

AND(OR(...),B5="Yes")

will return true if the OR() and B5="Yes" are both true.

=IF(AND(OR(...)...),"Text","No")

Will display "Text" if the AND() returns true, "No" if it doesn't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.