# Excel formula

##### New Member
I am trying to create a formula that will sum two numbers on excel that will have an answer of the sum of the numbers except if the sum is less than zero the answer will be zero.

Help!

### Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

#### Elemental

##### Board Regular
=IF(SUM(A1:B1)>=1,SUM(A1:B1),0) enjoy

#### Todd Bardoni

##### Well-known Member
if(a1+b1<0,0,a1+b1)

#### IML

##### MrExcel MVP
If your range is A1:A10, you could use
=MAX(0,SUM(A1:A10))

good luck

##### New Member
Thank you very much - one problem though: I really needed to have the difference of two numbers and if this difference is less than 0 it needs to be 0. For example: 25 - 35 = 0.

Thank you again!

#### Elemental

##### Board Regular
doesnt need to change much then

=IF(A1-B1>=0,A1-B1,0) enjoy

Replies
2
Views
128
Replies
6
Views
209
Replies
6
Views
109
Replies
8
Views
78
Replies
2
Views
78