negative value ==> put a 0

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
 
G

Gord Dibben

=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
 
N

Niek Otten

=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
 

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