negative value ==> put a 0

  • Thread starter Thread starter marco.nickoli
  • Start date Start date
M

marco.nickoli

Hello!
In a cell with a SUM I need to put 0 when the sum is negative.
For example, X=Z+Y+W. If X>=0 ==> I want to put the right value.
BUT IF X<0 I want to have 0 in the cel!
How could I do this?
thanks,
marco
 
=IF(G4+G5+G6)<0,0,(G4+G5+G6))

=IF(SUM(G4:G6)<0,0,SUM(G4:G6)) if contiguous

=IF(SUM(G4,G5,G8)<0,0,SUM(G4,G5,G12)) if non-contiguous


Gord Dibben MS Excel MVP
 
=MAX(0,G1+G2)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hello!
| In a cell with a SUM I need to put 0 when the sum is negative.
| For example, X=Z+Y+W. If X>=0 ==> I want to put the right value.
| BUT IF X<0 I want to have 0 in the cel!
| How could I do this?
| thanks,
| marco
 
Back
Top