11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

290<br />

Part II: Using Functions in Your <strong>Formula</strong>s<br />

Rounding to n significant digits<br />

In some cases, you may need to round a value to a particular number of significant digits. For<br />

example, you might want to express the value 1,432,187 in terms of two significant digits (that is,<br />

as 1,400,000). The value 9,187,877 expressed in terms of three significant digits is 9,180,000.<br />

If the value is a positive number with no decimal places, the following formula does the job. This<br />

formula rounds the number in cell A1 to two significant digits. To round to a different number of<br />

significant digits, replace the 2 in this formula with a different number.<br />

=ROUNDDOWN(A1,2–LEN(A1))<br />

For non-integers and negative numbers, the solution gets a bit trickier. The formula that follows<br />

provides a more general solution that rounds the value in cell A1 to the number of significant digits<br />

specified in cell A2. This formula works for positive and negative integers and non-integers.<br />

=ROUND(A1,A2–1–INT(LOG10(ABS(A1))))<br />

For example, if cell A1 contains 1.27845 and cell A2 contains 3, the formula returns 1.28000 (the<br />

value, rounded to three significant digits).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!