[Solved] Making a formula

Discuss the spreadsheet application
Post Reply
davidsllc
Posts: 5
Joined: Mon Jul 12, 2021 2:14 am

[Solved] Making a formula

Post by davidsllc »

I need to make a formula:

=U9*0.07 and if greater than 30K add $500
Last edited by Hagar Delest on Mon Jul 12, 2021 10:47 pm, edited 1 time in total.
Reason: tagged solved.
OpenOffice 4.1.7
Windows 10
User avatar
robleyd
Moderator
Posts: 5082
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Making a formula

Post by robleyd »

if greater than 30K
Assuming that refers to the result of U9*.07; you already have one part of the formula. To test the value of U9*.07 and add accordingly, the second part of the formula might be

Code: Select all

+IF(U9*.07 > 30000;500;0)
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Making a formula

Post by RusselB »

Since the OP wants to add $500, then I would think an option could be

Code: Select all

=u9*.07+if(current()>30000;500;0)
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.
davidsllc
Posts: 5
Joined: Mon Jul 12, 2021 2:14 am

Re: Making a formula

Post by davidsllc »

I tried =U9*0.07+IF(CURRENT(U9)>30000;500;0) and it still did not work
OpenOffice 4.1.7
Windows 10
davidsllc
Posts: 5
Joined: Mon Jul 12, 2021 2:14 am

Re: Making a formula

Post by davidsllc »

So the formula I am trying to make is the total of U9 x 7% +$500 if over 30,000.00
OpenOffice 4.1.7
Windows 10
User avatar
robleyd
Moderator
Posts: 5082
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Making a formula

Post by robleyd »

Both my suggestion and RusselB's behave as desired for me. What does 'did not work' mean - do you get an error?

See attached spreadsheet which uses both formulae - scroll across to U9.
Attachments
davidsllc.ods
(7.84 KiB) Downloaded 87 times
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Making a formula

Post by Villeroy »

+500 if which value is greater than 30000?
a) U9 or b) U9*0.07?

a) =U9*0.07+IF(U9>30000;500;0)
b) =U9*0.07+IF(CURRENT()>30000;500;0)
CURRENT() returns the calculation result so far, U9*0.07 in this case.
Equivalent b) =U9*0.07+IF(U9*0.07>30000;500;0)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
davidsllc
Posts: 5
Joined: Mon Jul 12, 2021 2:14 am

Re: Making a formula

Post by davidsllc »

It gave me the following error: #NAME?
OpenOffice 4.1.7
Windows 10
davidsllc
Posts: 5
Joined: Mon Jul 12, 2021 2:14 am

Re: Making a formula

Post by davidsllc »

I figured it out, Thanks so much
OpenOffice 4.1.7
Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Making a formula

Post by RusselB »

davidsllc wrote:I tried =U9*0.07+IF(CURRENT(U9)>30000;500;0) and it still did not work
You have a U9 in the parameter location of the CURRENT function. While that is a parameter location, it must be BLANK
Compare the actual formula I posted with the one you tried.
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.
Post Reply