4

What am I doing wrong here, using the =IF in excel? I type =IF(D7=D6,1,0) see

enter image description here

3
  • The statement is correct. I tried it and works for me. Are you sure you use it correctly?? – Illyes Istvan Nov 23 '12 at 18:52
  • Are you currently focused on the cell with the formula in it? When you press Enter, does the formula evaluate? – dangowans Nov 23 '12 at 18:55
  • The screenshot looks like it has semi colons between the arguments instead of commas. Try semi colons. – dangowans Nov 23 '12 at 18:58
5

This is likely due to your region settings. This forum post mentions a similar problem. If the comma is used when separating the whole and fractional parts of a number, it cannot be used to separate arguments in a formula.

To review how your computer interprets numbers, you can look at the "Regional and Language Options" in the Control Panel. Look at the "Number" sample. I'm using "English (United States)", so my number is "123,456,789.00". (Note the decimal point separating the whole and fractional parts of the number.)

Looking at your screenshot, it looks like there are semicolons between the formula arguments in the tooltip, not commas. Try using semicolons rather than commas to separate the arguments.

=IF(D7=D6;1;0)
5

While dangowans' answer is a good workaround, it doesn't solve the problem for long-time users of Excel who are fluent in typing formulas using commas.

Switching to using a semi-colon after using Excel for over 20 years is not an option for me.

So here is how to "fix" what Microsoft has broken:

  • Go to the Region settings (Start Menu.. type region and choose "Region", not "Region and language settings")
  • Choose Additional settings...
  • Update Decimal symbol to not be a comma - I use a decimal point (e.g. 1.3)
  • Update List separator to be a comma.
  • Apply
  • Do the same thing on the Currency tab for the Decimal symbol

Excel will now accept formulas in the old way, and you will be able to use it like you always have.


References:

1
  • 2
    +1 One must sometimes ask ones self: "Microsoft... WTF?" :P – Jimbo Oct 8 '15 at 7:54
0

It is in the Regional Settings in Windows 10. You can see in the List Separator Field, it is indicated a semicolon, just change it to comma.

1
  • This just duplicates the information in the existing answers. Please don't post answers that do not contribute a new solution to the question. – fixer1234 Apr 12 '16 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.