9

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.

  • 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 Oct 17 '13 at 13:17
11

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

  • 1
    Yes, it works. But why does all the documentation mention ","? – Josef Sábl Oct 17 '13 at 13:44
  • 1
    I have no idea, normally it is used ";" in this expressions – Ale Oct 17 '13 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 Oct 18 '13 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. – Tom Horwood Oct 21 '13 at 0:46

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.