# Where Did I go Wrong - OR, ANDs and ELSE

#### Frank Bacchus

##### Member
Hi all:

Below is a formula consisting of two conditions which are:

(1) If the value in L2 AND the value in M2 are both blanks, then set the value of the current cell to "No TRD, TPR, HIF" (this works by itself)
(2) If the value in A2 OR the value in B2 is NOT blank, then set the value of the current cell to "TRD, TPR" else set the current cell to “Investigate”.

Formula:
=IF(AND(L2="", M2=""),"No TRD, TPR, HIF"), IF(NOT(OR(A2 ="", B2 ="")),"TRD, TPR"," Investigate")

I get a #VALUE when both A2 and B2 are “”

Your feedback would be much appreciated. Thanks

Frank

#### Hany ali

##### Member
hi
Code:
``=IF(AND(L2="",M2=""),"No TRD",IF(NOT(OR(A2="",B2="")),"TRD TPR"," Investigate"))``
if Not Correct ,it should to Upload the File

• Frank Bacchus

#### Fluff13

##### Active Member
=IF(AND(L2="", M2=""),"No TRD, TPR, HIF", IF(OR(A2 <>"", B2<>""),"TRD, TPR"," Investigate"))

#### Frank Bacchus

##### Member
Thanks. Worked and I appreciate it.

frank

#### Fluff13

##### Active Member
Glad we could help & thanks for the feedback