Getting rid of all negative numbers on a worksheet

  • Thread starter Thread starter abxy
  • Start date Start date
A

abxy

Ok, for the workbook i'm building, I need all numbers equal to or less
than 0 to *not* be displayed. Instead I want the cells to be left blank
or display: -- (i'd prefer if the cells were blank though).

The real problem is that I have a range of cells that have the formula
=DAYS360 in them. That formula counts the days between two dates on the
worksheet, but when one date is entered and the other isn't, the cell
displays a huge negative number( becuase of the dept. i work in, i
never know the second date until sometime later, but the sheet still
has to be printed up in the meantime). I've tried everything I could
think of to fix it or get around this problem, but nothing quite works,
then, I realized "well, if I could just get the worksheet to display a
blank cell anytime a cell value is 0 or less, then the problem wouldn't
exist"

thanks
 
Ok, for the workbook i'm building, I need all numbers equal to or less
than 0 to *not* be displayed. Instead I want the cells to be left blank
or display: -- (i'd prefer if the cells were blank though).

Use a custom format:

One that would work would be "0.00;;"

The first argument is for positive numbers. The second is for negative numbers
and the third for zero's. Since there is nothing there, those values will not
be displayed.

Since you posted in a programming group, the VBA method would be


rng.NumberFormat = "0.00;;"


--ron
 
Back
Top