View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2169_] Rick Rothstein \(MVP - VB\)[_2169_] is offline
external usenet poster
 
Posts: 1
Default How to programmatically add a non standard custom cell format

Does this...

#,"000"

or perhaps this (if you want to retain the "leading" zero for values less
than 1000)...

0,"000"

custom format do what you want (use them exactly as shown... with the quote
marks)?

Rick


"tiamat" wrote in message
...
Hi,

I have a value in a cell I.e. 123456 that I wish to display to 3
significant
figures I.e. 123000.

My question is this : I wish to present the significant value as a display
format and not change the underlying value.

So far as I am aware the custom cell format codes do not include a
significant figure code. I.e. #, etc..

I can use either a UDF or macro that can return the value to the required
significant figures.

So any ideas? Is there a way I can do this I.e. have 123456 in the cell
but
display 123000. Note the cell value is not a fixed width I.e. it could
take
values such as 0.0001234, 1234, 1234.123, etc. and be displayed as
0.000123,
123, 1230.