Forum Discussion

Sean Craig's avatar
Sean Craig
Copper Contributor
Feb 14, 2018

Does not equal range or cell in Countif

Hello.  I'm having trouble with the syntax for the argument to say "does not equal text in cell M12" with the portion of my formula below.
 
IF(AND(C15=C16,COUNTIF(U$7:U$30,O16),COUNTIF(U$7:U$30,"<>M12"))
 
I've included the entire string below and the sheet attached.
 
Can anyone help with this?
 
Cheers, 
Sean.
 
This is the entire formula for reference:
=IF(C15="","",IF(C14=C15,"",(IF(AND(COUNTIF(U$7:U$30,M15),COUNTIF(U$7:U$30,O15)),"",IF(AND(C15=C16,COUNTIF(U$7:U$30,O16),COUNTIF(U$7:U$30,"<>M12")),"BL",IF(AND(C15=C16,COUNTIF(U$7:U$30,O16),COUNTIF(U$7:U$30,M15)),"L",IF(AND(COUNTIF(U$7:U$30,M15)),"LD",IF(COUNTIF(U$7:U$30,O15),"BL","BLD"))))))))

2 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Sean,

     

    try this:

    IF(AND(C15=C16,COUNTIF(U$7:U$30,O16),COUNTIF(U$7:U$30,"<>"&M12))
    • Sean Craig's avatar
      Sean Craig
      Copper Contributor

      Thanks Detlef!  I had tried that but was missing the <space> between


      Detlef_Lewin wrote:

      Sean,

       

      try this:

      IF(AND(C15=C16,COUNTIF(U$7:U$30,O16),COUNTIF(U$7:U$30,"<>"&M12))


      < >.  Cheers.

Resources