13

What is wrong with this code?

= IF (F3+E3+D3 > 0, F3+E3+D3, 0)

I want the cell to contain the sum only if it is positive. If it is negative I want zero to be there.

Google Spreadsheet gives me error: Parse error.

1
  • The function's working fine for me. I copied and pasted it into Google Spreadsheet without making any changes to it. There doesn't seem to be anything wrong with it from my perspective.
    – Yassar
    Commented Oct 17, 2013 at 13:17

1 Answer 1

17

Have you tried to use ";" instead of "," ?

5
  • 1
    Yes, it works. But why does all the documentation mention ","?
    – Josef Sábl
    Commented Oct 17, 2013 at 13:44
  • 1
    I have no idea, normally it is used ";" in this expressions
    – Ale
    Commented Oct 17, 2013 at 13:49
  • Probably some mess with the locales. In my country we use "," as decimal separator so 1,2,3,4 could be interpreted as either 1.2, 3.4 or 1, 2, 3, 4. Google, come on!?
    – Josef Sábl
    Commented Oct 18, 2013 at 15:00
  • 3
    @Josef The standard used by Google stipulates that ; must be allowed, but that , can be used. Due to the locale issues you mentioned, the comma won't work in locales where the decimal separator is a comma. On the other hand, semi-colons will work in any locale. Unfortunately the docs seem to have been written by someone in the US (or UK, Australia etc) and they chose to use the comma. They have been informed, but Google issue resolution is a slow, mysterious beast. Commented Oct 21, 2013 at 0:46
  • Also, try using double quotes " instead of single quotes ' if your formula has quotes in it.
    – Flimm
    Commented Dec 8, 2021 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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