Share this content
4

Basic excel question

Basic excel question

Didn't find your answer?

Very basic question here!!

How can I say "If B12 is a negative number insert a 0"

Replies (4)

Please login or register to join the discussion.

avatar
By accountright
16th Sep 2011 09:58

Formula                      

Formula                                  Description (Result)

=A2-A3                                   Second number subtracted from the first (0)

=IF(A2-A3=0,"",A2-A3)             Returns a blank cell when the value is zero (blank cell)

=IF(A2-A3=0,"-",A2-A3)             Returns a dash when the value is zero (-)

 

This is the basic formula - instead of a dash in the example put in a zero

Polly

Thanks (1)
avatar
By nogammonsinanundoubledgame
16th Sep 2011 09:58

You do not say what should be entered if B12 is not a negative number, but making an assumption I suggest

=MAX(B12,0)

May need adjustment if B12 may contain text

With kind regards

Clint Westwood

Thanks (1)
avatar
By jonspe
16th Sep 2011 10:51

excel

Using this:

=IF(B12<0,0,B12)

will produce in the cell in which the formula is entered:

The contents of B12, if B12 is equal to or greater than 0.

or

"0" if b12 is a negative number.

If instead of just a non-descript "0" you want something more informative, do something like:

=IF(B12<0,"NEGATIVE NUMBER",B12)

Remember to enclose any non-numeric stuff in double inverted commas.

 

 

Thanks (2)
Replying to caniya:
avatar
By KarenCCarr
16th Sep 2011 10:53

thanks very much

Thanks (0)
Share this content