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. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2012-09-24T21:02:07+00:00

    This worked perfectly.  Thank you so much.

    0 comments No comments
  3. Anonymous
    2015-03-19T19:35:53+00:00

    I'm having trouble  with this forumla: 

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

    The problem is that the Zero is not being recognized as Not Equal to and so if the column D is the number 2 and the column L is 0,  the  value is 2 , or  D - Zero.  

    What I am trying to do is to compare difference in value between the 2 columns, but only want to display the number IF column L is greater. 

    TIA.

    Jeff

    0 comments No comments
  4. Anonymous
    2015-03-19T20:11:52+00:00

    how about this way:

    =IF(L3-D3>=2,L3-D3,"")

    Jim

    0 comments No comments