# Round a number to n significant digits

327
2
04-23-2021 02:30 PM
Labels (1)
New Contributor III

In excel there is way to round numbers to significant digit that adapts to the size of the number being rounded. The following is the formula for it

`ROUND(number,digits-(1+INT(LOG10(ABS(number)))))`

Here,

1. ABS converts the value to an absolute (positive) value
2. LOG10 gets the exponent, in this case 6 with a decimal value
3. INT trims off the decimal part of the exponent
4. The formula uses the exponent and the supplied significant digits to figure out the right number of digits to give ROUND
5. ROUND rounds the number using the number of digits supplied

What is the survey 123 equivalent for ABS and INT in excel?

(Using formula explanation from this site >> https://exceljet.net/formula/round-a-number-to-n-significant-digits)

2 Replies
Esri Regular Contributor

Hello @PrachiPatel

Unfortunately Survey123 doesn't have an out of the box ABS function available, but there is a workaround. Please check out Ismael's comment on another post that discusses the workaround.

For the INT function, Survey123 has support for an int() function, please check out the XLSForm Formulas documentation for more information.

Thank you,

Zach

Thank you,
Zach
New Contributor