I have a spreadsheet which sums dimensions in the FIF Format – Feet, Inches, and Fraction. The fractions are in multiples of sixteens of an inch. The feet, inches, numerator, and denominator are all separate values in separate columns. The feet value is converted to inches and added to the inches value and then to the decimal value of the fraction (numerator/denominator) to arrive at decimal value in inches for the dimension. A running decimal total for the dimensions added is calculated. I am converting this running decimal dimension total back to the FIF Format. However, I want the fraction (decimal or mantissa portion of the RT dimension) to be in sixteens and have the lowest common denominator. For example: 4/16 would be represented as 1/4, 2/16 as 1/8 etc.
I have toyed with various ways of doing this but in researching on the internet I discovered the MROUND function. I set up a simple spread sheet to test Function using the method they showed as illustrated below in column E.
The fourth column D has the formula =C1-INT(C1) with custom formatting for number ##/##.
A B C D E 1 0 16 0 0/1 0/1 2 1 16 0.0625 1/16 1/16 3 2 16 0.125 1/8 1/8 4 3 16 0.1875 3/16 3/16 5 4 16 0.25 1/4 1/4 6 5 16 0.3125 5/16 5/16 7 6 16 0.375 3/8 3/8 8 7 16 0.4375 7/16 7/16 9 8 16 0.5 1/2 1/2 10 9 16 0.5625 9/16 9/16 11 10 16 0.625 5/8 5/8 12 11 16 0.6875 11/16 11/16 13 12 16 0.75 3/4 3/4 14 13 16 0.8125 13/16 13/16 15 14 16 0.875 7/8 7/8 16 15 16 0.9375 15/16 15/16
The fifth column E has the formula =MROUND(C1,1/16) with custom formatting for number ##/##.
Both, of these seem to work for showing the lowest common denominator fraction. I am not sure why? ANY THOUGHTS!!
It, sure beats Visual Basic Programing to achieve this result. I am trying to learn VBA at the present time.
Bookmarks