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.

Posted on May 2, 2023 9:28 AM

Reply
Question marked as Best reply

Posted on May 2, 2023 12:06 PM

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)&""""

2 replies
Question marked as Best reply

May 2, 2023 12:06 PM in response to MaikeJ

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)&""""

How to eliminate the decimals

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.