Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default NumberFormat for small non-zero numbers?

I have a column that subtracts two other columns and is displayed as currency. If the other two columns are "close", this column shows zero.

Most of the rows will be zero, and it's the non-zeros that are "interesting". So I've put in a NumberFormat to eliminate the zero, so it's a blank.

However, in many cases the number is not zero, but some very small value... 0.0000000000123

Is there anything I can do to make these fall into the zero format as well? I could round it, but is there an easier way?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default NumberFormat for small non-zero numbers?

Hi,

Am Mon, 26 Nov 2012 09:30:41 -0800 (PST) schrieb
:

Is there anything I can do to make these fall into the zero format as well? I could round it, but is there an easier way?


no, you have to use ROUND


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default NumberFormat for small non-zero numbers?

wrote:
I have a column that subtracts two other columns and
is displayed as currency. If the other two columns are
"close", this column shows zero.
Most of the rows will be zero, and it's the non-zeros
that are "interesting". So I've put in a NumberFormat
to eliminate the zero, so it's a blank.
However, in many cases the number is not zero, but some
very small value... 0.0000000000123
Is there anything I can do to make these fall into the
zero format as well? I could round it, but is there an
easier way?


It would be prudent to explicitly round all currency calculations, even
simple subtractions. For example, =ROUND(A2-A1,2).

That avoids infinitesimal anomalies that arise in Excel arithmetic due to
the way that Excel represents numbers internally (64-bit binary
floating-point).

For example, IF(10.1-10=0.1,TRUE) returns FALSE(!). But
IF(ROUND(10.1-10,2)=0.1,TRUE) returns TRUE as expected.

But if you wish, you might use the following Custom format:
[<0.005]"";$#,##0.00

Note that that works only for non-negative currency values.

The following Custom will also display negative currency values properly:
[<=-0.005]-$#,##0.00;[<0.005]"";$#,##0.00

However, both Custom formats display "-" (without quotes) for negative
values that are intended to displayed as just the null string. (A defect,
IMHO.)


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
Cells print so small I cannot read numbers. How do I fix? Leon New Users to Excel 1 November 6th 07 10:19 AM
Sorting numbers in a row from small to large Peter Herman Excel Discussion (Misc queries) 10 August 10th 07 08:10 PM
using linest with very small numbers flow guy Excel Worksheet Functions 4 August 24th 06 01:07 PM
setting numberformat for -ve numbers bsobaid Excel Programming 3 July 11th 06 11:25 AM
Small font on row & column numbers - wierd Mike R. Excel Discussion (Misc queries) 1 December 4th 04 12:32 PM


All times are GMT +1. The time now is 10:44 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"