Forum Discussion
Formula for Value-Combination (FIXED, LEN) doesn't work with values with changed decimal places
I wrote a formula to combine a value and its standard deviation in one cell.
Cell A1: 2.945
Cell B1: 0.003
formula: =FIXED(A1;(LEN(B1)-2))&"("&(B1*(10^(LEN(B1)-2))&")")
Result: 2.945(3)
In my area of work this way of adding the standard deviation with paranthesis to the end is common.
The formula works fine for unchanged numbers. When i actively change the decimal places (like reduce it to 3 places), the formula recognizes the length of the starting number. The result is shown below:
A1: 0.237
[edit: Values in A1 are also reduced to lower decimal places: 0.237000961170212]
B1: 0.00244365421481958 --> 3 decimal places --> 0.002
Result:
0.23700096117021200(244365421481958)
desired result:
0.237(2)
This is a direct copy of my reddit post:
https://www.reddit.com/r/excel/comments/lms79r/formula_for_valuecombination_fixed_len_doesnt/?utm_source=share&utm_medium=web2x&context=3
1 Reply
- mathetesGold Contributor
Try this: =FIXED(ROUND(A1,3),3)&"("&(ROUND(B1,3)*1000)&")"
Note my US system uses commas as separators rather than semicolons.