Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
significant digits | Excel Worksheet Functions | |||
Significant digits | Excel Worksheet Functions | |||
significant digits for decimals | Excel Worksheet Functions | |||
Calculations and significant digits | Excel Programming | |||
Calculations and significant digits | Excel Programming |