ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i make negative numbers equal zero (https://www.excelbanter.com/excel-worksheet-functions/115717-how-do-i-make-negative-numbers-equal-zero.html)

benny1

how do i make negative numbers equal zero
 
I have a sheet set up with formulas, and i need a coloumn to sum up with only
the positive number in it.

example, i need:
4+6+-2+2
to equal 12

any sugestions


Dave F

how do i make negative numbers equal zero
 
I would create a helper column which tests each value to insure that it is
positive, and, if not, sets a new value of zero and then sum that column.

Example: =IF(A2<0,0,A2) and fill down (say in column B)

Then sum column B.

Dave
--
Brevity is the soul of wit.


"benny1" wrote:

I have a sheet set up with formulas, and i need a coloumn to sum up with only
the positive number in it.

example, i need:
4+6+-2+2
to equal 12

any sugestions


Elkar

how do i make negative numbers equal zero
 
For this example, I'll assume your data is in A1:A4.

=SUMIF(A1:A4,"0",A1:A4)

Adjust the range to meet your needs.

HTH,
Elkar


"benny1" wrote:

I have a sheet set up with formulas, and i need a coloumn to sum up with only
the positive number in it.

example, i need:
4+6+-2+2
to equal 12

any sugestions



All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com