INT Function to Include Sum Function

scott11

New Member
Joined
Sep 13, 2016
Messages
37
Hello,

I have the following formula in column C: =INT(A2/12)&"' "&MOD(A2,12)&"""" which returns a value of 8' 8.75". I have several rows with this formula and at the end I would like to sum all the results to get the total feet and inches. Is this possible?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Why not just sum the values in col A & then use your formula to convert it?
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Not really, you could use something like
Excel Formula:
=INT(A2/12)&"' "&INT(MOD(A2,12))&" "&INT(MOD(A2,1)*4)&"/4"&""""
but it won't be overly accurate.
+Fluff 1.xlsm
ABC
1
2104.63/58' 8 2/4"
3104.77/108' 8 2/4"
4104.51/28' 8 2/4"
5104.42/58' 8 1/4"
Master
Cell Formulas
RangeFormula
B2:B5B2=MOD(A2,1)
C2:C5C2=INT(A2/12)&"' "&INT(MOD(A2,12))&" "&INT(MOD(A2,1)*4)&"/4"&""""
 
Upvote 0
You could just use a custom number format of

# ??/12

No formula needed.
 
Upvote 0
Hi,

A few suggestions/options for you to consider:

Cell Formulas
RangeFormula
C2:C9C2=INT(A2/12)&"' "&MOD(A2,12)&""""
D2:D9D2=INT(A2/12)&"' "&TEXT(MOD(A2,12),"0.00")&""""
E2:E9E2=INT(A2/12)&"' "&ROUND(MOD(A2,12),2)&""""
F2:F9F2=INT(A2/12)&"' "&TEXT(MOD(A2,12),"0 #/#")&""""
G2:G9G2=INT(A2/12)&"' "&TEXT(MOD(A2,12),"0 0/#0")&""""
H2:H9H2=INT(A2/12)&"' "&TEXT(MOD(A2,12),"##-##/##")&""""
I2:I9I2=INT(A2/12)&"' "&TEXT(MOD(A2,12),"##-##/10")&""""
C11C11=INT(SUM(A2:A5)/12)&"' "&MOD(SUM(A2:A5),12)&""""
D11D11=INT(SUM(A2:A5)/12)&"' "&TEXT(MOD(SUM(A2:A5),12),"0.00")&""""
E11E11=INT(SUM(A2:A5)/12)&"' "&ROUND(MOD(SUM(A2:A5),12),2)&""""
F11F11=INT(SUM(A2:A5)/12)&"' "&TEXT(MOD(SUM(A2:A5),12),"0 #/#")&""""
G11G11=INT(SUM(A2:A5)/12)&"' "&TEXT(MOD(SUM(A2:A5),12),"0 0/#0")&""""
H11H11=INT(SUM(A2:A5)/12)&"' "&TEXT(MOD(SUM(A2:A5),12),"##-##/##")&""""
I11I11=INT(SUM(A2:A5)/12)&"' "&TEXT(MOD(SUM(A2:A5),12),"##-##/10")&""""


Change the 10 at the end of my I Column formula to whatever fraction you desire (e.g. 8, 10, 12, 16, etc.)

@Eric W, I'm not sure if cell formatting would work, as the OP's results are Text.
 
Upvote 0
You wouldn't apply the cell formatting to the results of the formula, you apply it to the cell with the number in it:

Book1
AB
1
2104.6104 7/12
3104.7104 8/12
4104.5104 6/12
5104.4104 5/12
6
Master


Excel does its best to find the "closest" fraction with that denominator. It could be slightly above, below, or the same as the decimal equivalent, so if so you need to round up (or down) to the closest multiple of 1/12, you'd need a formula such as you suggested.
 
Upvote 0
Imperial feet-inches, if you want to format proper number fraction part, the denominator like /2, /4, /8, /16, /32, /64, /128, /256, /512, etc. use MROUND() with TEXT() functions.
MROUND() round the number to the desired multiple, for example 1/64, and Excel TEXT() format will take care the rest.

The denominator format number of digits (##) should be equal or more than the multiple (64)

TEXT(MROUND(A2, 1/64),"# #/##")
1670666264220.png
1670666392735.png


My thoughts on using INT() function in formula to convert to, or from any unit and depending the case of usage, it is good with positive number greater 0, but not with negative number less than 0, INT() is not symmetrical when rounding, I would avoid it all cost!

Ex:

INT(9.8) = 9
INT(-9.8) = -10

As you can see, INT() rounds a number down to the nearest integer, therefor when it in formula for conversion it behaves different with negative number!
Sum up, INT() when use in formula to compute a positive number, like convert to 'feet-inches', it's OK, but beware when using with negative number like minus tolerance it's may be incorrect result!

My 2 cents,

Phh
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,716
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top