Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Raj
 
Posts: n/a
Default significant digits for decimals

If I have a number 0.0246589
and would like to get the 3 significant digits, what would be the function
to use?
The function (=round("cell"3-LEN(INT("cell")))) works for numbers above zero.

Thanks in advance
  #2   Report Post  
Paul Sheppard
 
Posts: n/a
Default significant digits for decimals


Raj Wrote:
If I have a number 0.0246589
and would like to get the 3 significant digits, what would be the
function
to use?
The function (=round("cell"3-LEN(INT("cell")))) works for numbers above
zero.

Thanks in advance


Hi Raj

If the 0.0246589 is in cell A1 in B1 put =ROUND(A1,3), this returns a
vlue of 0.025


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=481908

  #3   Report Post  
MrShorty
 
Posts: n/a
Default significant digits for decimals


Raj:

Are all your values of the same magnitude (0.0xxxxx)? If so, you could
use a 0.0000 number format or ROUND(a1,4), similar to what Paul
suggested.

If not, then the easiest way I know of to get three sig figs is to use
a scientific number format (0.00E+0), but a lot of people are either
uncomfortable with exponential notation or for some other reason it
isn't desirable.

A function like ROUND(A1,INT(LOG(A1)-2) will return a number to three
significant figures regardless of the magnitude. It will even take a
number like 1234.5 and return 1230. But it won't display significant
0's after the decimal point (eg a number like 0.13014 returns 0.13.
If this solution is the most desirable, I'm sure we could come up with
a way of dealing with this case to make this work properly.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=481908

  #4   Report Post  
MrShorty
 
Posts: n/a
Default significant digits for decimals


Whoops: That function should ROUND(A1,2-INT(LOG(A1)))


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=481908

  #5   Report Post  
Raj
 
Posts: n/a
Default significant digits for decimals

MrShorty,
No, some cells will have the numbers like 236548 and some others 0.38649. I
wanted to see if there is a common function that can be used to return 3 (or
4) significant numbers.

Thanks

Raj

"MrShorty" wrote:


Raj:

Are all your values of the same magnitude (0.0xxxxx)? If so, you could
use a 0.0000 number format or ROUND(a1,4), similar to what Paul
suggested.

If not, then the easiest way I know of to get three sig figs is to use
a scientific number format (0.00E+0), but a lot of people are either
uncomfortable with exponential notation or for some other reason it
isn't desirable.

A function like ROUND(A1,INT(LOG(A1)-2) will return a number to three
significant figures regardless of the magnitude. It will even take a
number like 1234.5 and return 1230. But it won't display significant
0's after the decimal point (eg a number like 0.13014 returns 0.13.
If this solution is the most desirable, I'm sure we could come up with
a way of dealing with this case to make this work properly.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=481908




  #6   Report Post  
Harlan Grove
 
Posts: n/a
Default significant digits for decimals

MrShorty wrote...
....
If not, then the easiest way I know of to get three sig figs is to use
a scientific number format (0.00E+0), but a lot of people are either
uncomfortable with exponential notation or for some other reason it
isn't desirable.

A function like ROUND(A1,INT(LOG(A1)-2) will return a number to three

....

Arguably simpler to use scientific notation as an intermediate step.

=--TEXT(A1,"0."&REPT("0",SigDig-1)&"E-0")

or hardcoded for 3 significant digits

=--TEXT(A1,"0.00E-0")

This approach also handles nonpositive numbers.

  #7   Report Post  
Raj
 
Posts: n/a
Default significant digits for decimals

Your equation needed a slight modification. As it is, it is OK for decimals,
but not OK for big numbers. I made this modification and it works for both
magnitudes.
=ROUND(C4,(3-1)-INT(LOG(C4)))

The trick is to subtract 1 from the number of digits you want.
Thanks everybody
Raj

"MrShorty" wrote:


Whoops: That function should ROUND(A1,2-INT(LOG(A1)))


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=481908


  #8   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default significant digits for decimals

http://groups.google.com/group/micro...244c8f41e91025

Jerry

Raj wrote:

If I have a number 0.0246589
and would like to get the 3 significant digits, what would be the function
to use?
The function (=round("cell"3-LEN(INT("cell")))) works for numbers above zero.

Thanks in advance


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
Mistery digits on excel Bewilder Excel Discussion (Misc queries) 2 October 5th 05 06:28 PM
excel floating digits error Bewilder Excel Discussion (Misc queries) 3 October 5th 05 05:56 PM
return significant digits of a cell Chace Excel Worksheet Functions 2 October 1st 05 01:35 PM
How do I increase the of significant digits given in the slope i. mcozbyl Charts and Charting in Excel 2 April 7th 05 12:52 PM
Least number of digits in Y-axis labels Charley Kyd Charts and Charting in Excel 9 February 6th 05 03:03 PM


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

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

About Us

"It's about Microsoft Excel"