LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default 3 most significant digits

Hi there,
I'm using the following code to get the 3 most significant numbers on a
cell. The cell properties is set to General
------------------------------------------------------------------------------------
For Each c In Range("F9", "F25")
c.Offset(0, 3).Value = Application.Round(c.Value, 2 - Int(Log10(c.Value)))
next
.................................................. .................................................. .......
Static Function Log10(x)
Log10 = Log(x) / Log(10#)
End Function
---------------------------------------------------------------------------------------
it works except when the value is 0.30 it shows 0.3
How can I set the properties or change the code so it shows always the 3
most significant digits?
0.3215 0.322
0.3000 0.300
80.84 80.8
530.15 530
and so on

Any help is appreciated.
Gaba
 
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
significant digits Gordon[_2_] Excel Worksheet Functions 20 October 1st 08 07:14 PM
Significant digits Marcus Excel Worksheet Functions 5 November 16th 05 03:39 PM
significant digits for decimals Raj Excel Worksheet Functions 7 November 4th 05 01:26 AM
Calculations and significant digits Harald Staff Excel Programming 4 June 14th 05 07:02 PM
Calculations and significant digits Nikos Yannacopoulos[_5_] Excel Programming 0 September 14th 04 09:44 AM


All times are GMT +1. The time now is 10:39 AM.

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"