What is the correct syntax for "does not equal" in Excel 10

Anonymous
2012-09-24T16:10:33+00:00

I have a formula, =IF(K57900<>"SALES",AND,IF(AJ57900="SIC","Review Plan Type"," "))

I'm trying to flag the data where the Job Function is not equal SALES, and the Bonus type is SIC, with the Text "Review Plan Type".    This formula is returning the flag where the Function is equal to Sales, instead of when Function does not equal sales. 

Thanks for any help

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2012-09-24T16:15:06+00:00

    Kristin wrote:

    I have a formula, =IF(K57900<>"SALES",AND,IF(AJ57900="SIC","Review Plan Type"," "))

    I'm trying to flag the data where the Job Function is not equal SALES, and the Bonus type is SIC, with the Text "Review Plan Type".    This formula is returning the flag where the Function is equal to Sales, instead of when Function does not equal sales.  

    Your syntax for "not equal" is correct (<>).  It is you syntax for AND that is wrong.  Write:

    =IF(AND(K57900<>"SALES",AJ57900="SIC"),"Review Plan Type","")

    Note:  I changed " " (with a space in between) to "" (the null string).  It is a good practice.  It might make other dependent formulas easier to write.

    PS:  The posted syntax actually gives me a #NAME error, not "the flag" ("review...").  If that is what you meant, fine.  Otherwise, in the future, copy-and-paste from the Formula Bar, especially when you have a syntax question.

    21 people found this answer helpful.
    0 comments No comments

15 additional answers

Sort by: Most helpful
  1. Anonymous
    2015-03-20T02:08:03+00:00

    this must be a fault in Excel 2011 for the Mac.   :-(   Boo!

    If D2 is  5 and L2  is 0, then I expect to see the <  instead of  5

    0 comments No comments
  2. Anonymous
    2015-03-20T02:58:28+00:00

    this must be a fault in Excel 2011 for the Mac.   :-(   Boo!

    If D2 is  5 and L2  is 0, then I expect to see the <  instead of  5

    just a suggestion - try using the OR function instead of AND.

    Jim

    0 comments No comments
  3. Anonymous
    2015-07-15T18:57:08+00:00

    From my understanding, if you are just trying to find the difference between D and L, but only if L > D and L is not 0, then the best way to do it would be to use an OR statement inside your AND statement. I got it to work in my sheet based off my understanding of what you're looking to do; the formula looks like this: 

    =IF(AND(D3<L3,OR(L3>0,L3<0)),"<",D3-L3)

    Hope this helps, I know the struggles of trying to find an exact answer to what you are having problems with.

    Matt

    0 comments No comments