What would I set up this formula

K

Karen

I want to get the totals of several cells but not use any negative numbers;
plus I want to round up the currency to the nearest 2nd number would this
work

=If(Sum(F2+F3)>0,Roundup,2)
 
G

Graeme K Moore

Karen,

Try this:

=ROUND(SUMIF(F2:F3,">0"),2)

The Explanation:

The SUMIF() statement only add those results within the range F2:F3 that are
above 0 (effectively ignoring the minus values.

The ROUND() Statement then rounds the result to the NEAREST 2 decimal places.
You could use ROUNDUP() or ROUNDDOWN() should you so round up or down.

Hopes this helps.
 
T

T. Valko

One way....

Assuming that "round up the currency to the nearest 2nd number" means:

10.333 = 10.33
10.335 = 10.34

=ROUND(SUMIF(F2:F3,">0"),2)
 
D

David Biddulph

Did you try the formula? What answer did you get?

Firstly, look at the Excel Help for the SUM function. If you want to use
the SUM function to add F2 and F3 then you can use SUM(F2,F3) with the
arguments separated by a comma, but alternatively F2+F3 will add F2 and F3
without needing a SUM around it.

Secondly, look at the Excel help for the ROUNDUP function to see the syntax
of that function.

If you are saying that having added F2 and F3 you want to test the total
against zero, and if the total is positive you want to round up to 2 places
of decimals, then you could use
=If(F2+F3>0,Roundup(F2+F3,2),"whatever answer you want if F2+F3 is zero or
negative")

If that isn't what you are trying to do, you may wish to refine your
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top