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-19T20:25:42+00:00

    how about this way:

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

    Jim

    Hi,  the value of 2 changes with each row... The way the form works, if the item is missing, a zero is entered in the field.   Also, every time I try to enter the = sign or ≠  or !,  the formula kicks out an error in Mac Excel 2011.  Those characters are not accepted inside the parentheses.

    0 comments No comments
  2. Anonymous
    2015-03-19T21:02:06+00:00

    how about this way:

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

    Jim

    Hi,  the value of 2 changes with each row... The way the form works, if the item is missing, a zero is entered in the field.   Also, every time I try to enter the = sign or ≠  or !,  the formula kicks out an error in Mac Excel 2011.  Those characters are not accepted inside the parentheses. 

    well, I'm not familiar with how Mac Excel 2001 works, but maybe this will work:

    =(--(L4-D4)>0)*(L4-D4)

    Jim

    0 comments No comments
  3. Anonymous
    2015-03-19T21:15:40+00:00

     

    =(--(L4-D4)>0)*(L4-D4)

    Jim

    Can you explain this formula for me?   specifically the double dash

    0 comments No comments
  4. Anonymous
    2015-03-19T21:28:30+00:00

    the (l4-d4)>0 by itself will evaluate to either true or false. The -- coerces the true or false into its numerical equivalent, 1 or 0. Did the formula work for you the way you wanted?

    Jim

    0 comments No comments