How to eliminate the decimals
I'm using the formula to convert meters into feet and inches, but the result contain decimals, how can I remove the decimals.
I'm using the formula to convert meters into feet and inches, but the result contain decimals, how can I remove the decimals.
First an explanation:
This is one of those instances where Numbers being helpful is actually less than helpful. Numbers formulas will pick up things like currency format and number of decimal places from the cells (or a cell) referenced in the formula. So, for instance, if G3 was $1.83 (with the $ sign and formatted to two decimal places), your formula result would be $6.00"" $1.00'. You could format H3 as you wished f it was strictly a numeric formula with a numeric result, but this is a text formula.
Two possible solutions for your problem:
Format G3 so the number of decimal places is "auto" or format it so the cell is "automatic"
Or use text functions to fix the problem
=TEXTBEFORE(INT(G3×3.28084),".")&"' "&TEXTBEFORE(ROUND(MOD((G3×3.28084×12),12),0),".")&""""
Other info:
You should swap the " and ' in the string. You have them backward.
The CONVERT function is another way to do the formula.
=INT(CONVERT(B3,"m","ft"))&"' "&ROUND(MOD(CONVERT(B3,"m","in"),12),0)&""""
First an explanation:
This is one of those instances where Numbers being helpful is actually less than helpful. Numbers formulas will pick up things like currency format and number of decimal places from the cells (or a cell) referenced in the formula. So, for instance, if G3 was $1.83 (with the $ sign and formatted to two decimal places), your formula result would be $6.00"" $1.00'. You could format H3 as you wished f it was strictly a numeric formula with a numeric result, but this is a text formula.
Two possible solutions for your problem:
Format G3 so the number of decimal places is "auto" or format it so the cell is "automatic"
Or use text functions to fix the problem
=TEXTBEFORE(INT(G3×3.28084),".")&"' "&TEXTBEFORE(ROUND(MOD((G3×3.28084×12),12),0),".")&""""
Other info:
You should swap the " and ' in the string. You have them backward.
The CONVERT function is another way to do the formula.
=INT(CONVERT(B3,"m","ft"))&"' "&ROUND(MOD(CONVERT(B3,"m","in"),12),0)&""""
Thank you. I found out the problem, I set the decimals in "Height" to "2", this caused the problem, if I set it decimals to "auto", problem solved.
How to eliminate the decimals