If/Then with positive and negative numbers

Discuss the spreadsheet application

If/Then with positive and negative numbers

Postby keithbakerlv » Fri Apr 26, 2019 3:52 pm

Hi, I am trying to make a cell that says: IF C3 is positive then =SUM((C3*B3)/100) IF C3 is negative then =SUM(C3*B3)/50

Thanks for your help.
OpenOffice 4.1.3 on Windows 10 Pro
Posts: 9
Joined: Fri Mar 10, 2017 12:57 am

Re: If/Then with positive and negative numbers

Postby FJCC » Fri Apr 26, 2019 4:27 pm

This does what you want, I think.
Code: Select all   Expand viewCollapse view
=IF(C3 > 0; C3*B3/100;C3*B3/50)

That means that if C3 is greater than zero, calculate C3*B3/100. Otherwise calculate C3*B3/50. It is not necessary to use the SUM function. If C3 = 0, you will get zero from either calculation, so I didn't need to explicitly handle that case.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Posts: 7454
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Return to Calc

Who is online

Users browsing this forum: No registered users and 15 guests