Addition of positive numbers

  • Thread starter Thread starter Eden
  • Start date Start date
E

Eden

This is so simple, but I'm just not doing something right . . .

I have 2 different cells that I need to add together only as positiv
numbers.

So I know the formula is =SUM(IF(J25:J27>=0,J25:J27,0))
Then do Cntrl,Shft,Enter
But I don't have a column -- I have 2 cells located in differen
places.

Help???
 
Eden > said:
I have 2 different cells that I need to add together only as positive
numbers.

A literal translation into a formula;
=ABS(A1)+ABS(B1)
So I know the formula is =SUM(IF(J25:J27>=0,J25:J27,0))
Then do Cntrl,Shft,Enter
But I don't have a column -- I have 2 cells located in different
places.


But this looks like you want to add only the positive numbers, if not, just
return either 0 or the only positive number?

Some options, maybe one will work..

{=SUM(IF(AND(A1>=0,B1>=0),A1:B1,0))}

=IF(OR(A1<=0,B1<=0),MAX(A1,B1),0)
 
This comes the closest to what I need, but it looks like it's roundin
the number.
=IF(OR(A1<=0,B1<=0),MAX(A1,B1),SUM(A1,B1))

I'm calculating overtime on a timesheet, so I have cells for totals o
a week of work minus 40 hours as follows:

in J25 --- =K14+L14-40
then formatted as 0.00;; to not show a negative number

in J27 --- =K21+L21-40
then formatted as 0.00;; to not show a negative number

I want to add J25 and J27 as positive numbers only. So if my total i
J25 is 1.75, but my total in J27 is a negative number, I don't want th
negative number added in, the total would then just be 1.75.

I'm lost. Maybe there's an easier way to do all of this
 
That works -- and doesn't work.

It's simple and adds what I need, but still rounding the numbers. S
although J25 is 1.75, in the new calculation 1.75 is coming out 1.8.

I do appreciate all the help. My employees love this timesheet and
would hate to hang it up on one function
 
That's a formatting problem (I wager), change the format to number, 2
decimal places.

There's nothing in that formula that would round.
 

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

Back
Top