Does anyone have a function (or is able to suggest how i can construct one) which I pass a value and the return is the value to an indicated number of significant figures (with the last digit being rounded up/down accordingly).
For instance
19999 to 3 sf rounded down --> 19900
19999 to 3 sf rounded up --> 20000
12999 to 2 sf rounded down --> 12900
12999 to 2 sf rounded up --> 13000
1.23456 to 4 sf rounded up --> 1.235
1.23456 to 4 sf rounded down --> 1.234
Any ideas ?
Steve
For instance
19999 to 3 sf rounded down --> 19900
19999 to 3 sf rounded up --> 20000
12999 to 2 sf rounded down --> 12900
12999 to 2 sf rounded up --> 13000
1.23456 to 4 sf rounded up --> 1.235
1.23456 to 4 sf rounded down --> 1.234
Any ideas ?
Steve