Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numbers to Feet

Status
Not open for further replies.

Guest
I am trying to convert a number or part of a number to repersent feet. I know the formunla 1.25' = 1'-4" but I want to entry 1.25 and the cell display 1'-4" so I can complete the formunla.
Thank You
 
Replies continue below

Recommended for you

The following thread discusses converting sexagesimal to decimal, but the principle is the same:

thread770-28791
 

.25 feet = 3 inches...

Anyway, with 1.25 ft in cell C7, split it up into an interger and a remainder, viz:

in cell D7 you have +int(C7), that equals 1
in cell E7 you have + mod(C7,1), that equals .25

Then, to get the format you want, put

in cell F7 put +CONCATENATE(D7,"'","-",E7*12,"''"), that equals 1'-3"

Note, cell F7 now contains a text string, but it's what you want.
 
A slight refinement of DaveViking's method would be to use
=CONCATENATE(INT(F5),"' - ",12*(F5-INT(F5)),"''")
which only uses one extra cell, and it's still a text string.
 
Also you can try playing with the cell format. Choose format-cells-number-custom-type: #' -??/12 .Then 1.25 will look like 1'-3/12.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor