Home > Software design >  Excel if and or statement
Excel if and or statement

Time:08-03

EXCEL: Need help creating a formula that will return a true/false statement. I was thinking of using the IF/IFERROR(SEARCH) statement

Checking row to see if these conditions are true or false.

Conditions: Contains word: "yellow"

OR contains 8 number string AND 8 number string does not begin with the letter "B"

CodePudding user response:

Try below formula-

=OR(ISNUMBER(SEARCH("Yellow",A1)),AND(LEN(A1)=8,LEFT(A1,1)<>"B"))

enter image description here

CodePudding user response:

If in A1 you have the string, then in A2 write:

=IF(OR(IF(COUNTIF(A1;"*yellow*");TRUE;FALSE);AND(LEN(A1) = 8; LEFT(A1; 1) <> "B"));TRUE;FALSE)
  • Related