[Solved] Formula Help?

Discuss the spreadsheet application
Post Reply
Mugs444
Posts: 4
Joined: Wed Feb 13, 2019 4:51 pm

[Solved] Formula Help?

Post by Mugs444 »

Hi there,

This may be very simple, but I don't know how to search for it properly because I can't seem to find the answer.

I want to use a conditional format, but if the value is greater than 0, I'd like the answer to the equation to show, not the equation. Here's what I have now:

=IF(B30-B29<0; "0";IF(B30-B29>0;"=B30-B29")

and what shows in the cell is =B30-B29, but i'd like the answer to show, not the equation...

Thank you!

Mugs
Last edited by Hagar Delest on Thu Feb 14, 2019 9:06 am, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.1
Mac OSX 10.9.5
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Formula Help?

Post by RoryOF »

What happens if B30=B29? Why quotes about "0"? Why quotes about =B30-B29?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Formula Help?

Post by John_Ha »

Search Help with function and learn how to use the Function Wizard.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
robleyd
Moderator
Posts: 5055
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Formula Help?

Post by robleyd »

Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
Mugs444
Posts: 4
Joined: Wed Feb 13, 2019 4:51 pm

Re: Formula Help?

Post by Mugs444 »

RoryOF wrote:What happens if B30=B29? Why quotes about "0"? Why quotes about =B30-B29?
Error 510, thank you for trying!

=IF(B30-B29<0;"0";"=B30-B29") shows =B30-B29 in cell....

=IF(B30-B29<0;"0";=B30-B29) shows Err. 510

I don't know. I've looked on attached links, but am not find much about conditional. Function wizard says

IF Test; Then_Value; Otherwise_Value :shock: :roll:
Last edited by Mugs444 on Thu Feb 14, 2019 12:45 am, edited 1 time in total.
OpenOffice 4.1.1
Mac OSX 10.9.5
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Formula Help?

Post by RoryOF »

I meant "what should happen if B30=B29?" This condition is not catered for in your initial attempt.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Mugs444
Posts: 4
Joined: Wed Feb 13, 2019 4:51 pm

Re: Formula Help?

Post by Mugs444 »

RoryOF wrote:I meant "what should happen if B30=B29?" This condition is not catered for in your initial attempt.
It won't! I'm trying to track my writing. I have a daily goal of 1500 words. I wanted to set up a weekly goal of 10500, so if I have a bad day, I still am pushing for a 100% week. But right now rather than saying something like 40% or whatever it would be, it says -276% because the empty formula spot shows -32714 words. So here is my excel sheet:
Attachments
writingchart.png
OpenOffice 4.1.1
Mac OSX 10.9.5
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Formula Help?

Post by RusselB »

=IF(B30-B29<0;"0";=B30-B29) shows Err. 510
The problem with this formula is the second =
Use

Code: Select all

=IF(B30-B29<0;"0";B30-B29)
or as an alternative suggestion

Code: Select all

=max(0;B30-B29)
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Mugs444
Posts: 4
Joined: Wed Feb 13, 2019 4:51 pm

Re: Formula Help?

Post by Mugs444 »

The second option worked perfectly! Very simple and clean, thank you RusselB!
OpenOffice 4.1.1
Mac OSX 10.9.5
Post Reply