Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting rid of all negative numbers on a worksheet

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


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Getting rid of all negative numbers on a worksheet

Use an IF statement in your worksheet

=if(mycalc <0, "", mycalc)

HTH

Chris


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Getting rid of all negative numbers on a worksheet

On Fri, 9 Jan 2004 14:07:01 -0600, abxy
wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert to negative numbers in whole worksheet igbert Excel Discussion (Misc queries) 1 May 27th 10 10:09 PM
Excel, change column of negative numbers to positive numbers? Nita New Users to Excel 3 November 27th 07 04:54 AM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Set negative numbers to zero. Do not calculate with negative valu Excel Headache Excel Discussion (Misc queries) 4 September 14th 06 08:56 PM
change 2000 cells (negative numbers) into positive numbers lisbern Excel Worksheet Functions 2 August 16th 06 05:54 PM


All times are GMT +1. The time now is 06:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"