[Solved] "IF" Function

Discuss the spreadsheet application
Post Reply
stanco
Posts: 11
Joined: Sat Dec 01, 2007 10:07 pm

[Solved] "IF" Function

Post by stanco »

Prior to using Open Office Calc, I was using QuatroPro which is similar to Excel. In the past, I was able to use the "IF" function as in the following example:
@IF(C74-C73<O,O,C74-C73)

This formula is to return the result as zero if the result in C74 is less than C73. However, the formula does not work for me in Calc. Can you tell me what I'm doing wrong?
Last edited by stanco on Sun Dec 02, 2007 3:50 pm, edited 1 time in total.
RonIA
Volunteer
Posts: 139
Joined: Mon Oct 08, 2007 1:34 am
Location: Iowa USA

Re: "IF" Function

Post by RonIA »

Not being familiar with Quattro Pro, I would guess two things syntactically.

Instead of @ use = in front of your formula. Secondly use semicolons instead of commas.

I would also say you could make it simpler by just saying:

=IF(C74<C73;O;C74-C73)
Ron from Iowa, USA
stanco
Posts: 11
Joined: Sat Dec 01, 2007 10:07 pm

Re: "IF" Function

Post by stanco »

Ron1A

Thanks for your response.
Sorry, but I tried substituting your formula and the result show as"#NAME?" Don't really know what this means.

Stanco
RonIA
Volunteer
Posts: 139
Joined: Mon Oct 08, 2007 1:34 am
Location: Iowa USA

Re: "IF" Function

Post by RonIA »

I guess the next thing is, what values are in the fields you are comparing?
Ron from Iowa, USA
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: "IF" Function

Post by Hagar Delest »

I think the problem is in the formula : =IF(C74<C73;O;C74-C73). It should not be an 'O' (the letter) but a '0' (zero).

Code: Select all

=IF(C74<C73;0;C74-C73)
Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
RonIA
Volunteer
Posts: 139
Joined: Mon Oct 08, 2007 1:34 am
Location: Iowa USA

Re: "IF" Function (Solved)

Post by RonIA »

Thanks for that catch. I just copied and pasted the OPs formula and dropped the calculation in the comparison. I did wonder about the O vs 0, but onscreen I couldn't tell for sure. I bet that works.
Ron from Iowa, USA
Post Reply