Is there an easy formula to turn this formula in to decimal feet?
1' - 1 11/16"
Is there an easy formula to turn this formula in to decimal feet?
1' - 1 11/16"
"Easy"? I don't know if it is "easy", but, you just need to extract the different parts from the text string and convert them to appropriate numbers.
=VALUE(LEFT(text,1)) will return the 1 foot. The trick with extracting this will be knowing how many digits to return. Will the feet always be 1 digit? Can it be 2 digits? Do you need the formula to figure out how many digits for the feet part of the text string, or can you always trust that it will be however many digits (using leading zeros when needed)?
=VALUE(MID(text,6,7)) will extract the 1.6875 inches. Again, the real difficulty is will this always be 7 characters long, or should it be 8 characters long to account for the 10 and 11 inch increments (and force you to enter as 01 11/16) or do you need the formula to figure out on the fly how many characters to extract?
Of course, once you have the inches, you can convert to feet by dividing by twelve, then adding the initial feet number. =VALUE(LEFT(text,1)+VALUE(MID(text,6,7))/12 will convert that text string to 1.140625. From there, it's just a matter of knowing if that will always be the right way to parse the text string, or if you need the formula to figure out what to use for the 1, 6, and 7 parts of those text formulas. If this were my thing, and I assume that I will always be under 99 feet, I make the data entry step so that it will always be 2 digit feet and 2 digit inches and 2 digits for the fraction parts (aa' - bb cc/dd") with leading zeros when needed (your example would be entered as 01' - 01 11/16"), and use something like =VALUE(LEFT(text,2))+VALUE(MID(text(7,8))/12
Originally Posted by shg
it could be more than one digit. it could be 3 digits and possible 4, but for now I am dealing with 2 or 3 digits.
What would the formula be if you had either of the following?
1' - 1 11/16"
10' - 1 11/16"
100' - 1 11/16"
1000' - 1 11/16"
Thanks for your help. You have helped me before.
I am trying to extract this from a string that is already provided simular to below.
0' - 2 3/8"
0' - 6 1/16"
1' - 0 1/2"
1' - 6 1/4"
1' - 8 1/4"
1' - 11 15/16"
1' - 11 15/16"
8' 5"
2' - 1 11/16"
2' - 1 11/16"
2' - 1 15/16"
2' - 1 15/16"
2' - 1 15/16"
2' - 7 3/4"
2' - 11 3/8"
2' - 11 3/8"
2' - 11 15/16"
2' - 11 15/16"
3' - 1 1/8"
3' - 11 3/4"
4' - 0"
4' - 0 9/16"
6' - 5 1/2"
Are you understanding what the 1 and 2 are doing in the LEFT() function? The 6,7 and 7,8 in the MID() function? It should be the same function, just adjusting these parameters for the new text template. If you are not familiar with the LEFT() and MID() functions: https://support.office.com/en-us/art...6-1ea52b99640c and https://support.office.com/en-us/art...8-4ecb12433028
The new text template would be aaaa' - bb cc/dd", and the new function would be =VALUE(LEFT(text,4))+VALUE(MID(text,9,8))/12
In a different direction, I would be inclined to do a text to columns to separate the feet from the inches, and, if I could do it at the same time, get rid of the apostrophe and quotation mark characters.
So text to columns using - as the delimiter would get the feet and inches into separate columns. Something like VALUE(SUBSTITUTE(feet_text,"'","")) to get the feet number standing alone as a number. Then something like =VALUE(SUBSTITUTE(inches_text,CHAR(34),"")) to get the inches value alone as a number. Then a simple summation =feet_value+inches_value/12. Done that way, you end up with 5 additional columns (2 for the text to columns output, and 3 helper columns to convert the text to numbers and add them together). That might be the "easiest" way to do it.
So much depends on what kind of solution you need.
Last edited by MrShorty; 08-16-2018 at 04:45 PM.
Give this one a try
Enter formula in B1 and copy down
Formula:Please Login or Register to view this content.
v A B 1 0' - 2 3/8" 2.875 2 3 0' - 6 1/16" 3.8125 4 5 1' - 0 1/2" 1.5 6 7 1' - 6 1/4" 16.25 8 9 1' - 8 1/4" 21.25 10 11 1' - 11 15/16" 70.6875 12 1' - 11 15/16" 70.6875 13 14 8' 5" 15 16 2' - 1 11/16" 8.9375 17 2' - 1 11/16" 8.9375 18 19 2' - 1 15/16" 9.1875 20 2' - 1 15/16" 9.1875 21 2' - 1 15/16" 9.1875 22 23 2' - 7 3/4" 20.25 24 25 2' - 11 3/8" 16.125 26 2' - 11 3/8" 16.125 27 28 2' - 11 15/16" 71.6875 29 2' - 11 15/16" 71.6875 30 31 3' - 1 1/8" 4.375 32 33 3' - 11 3/4" 31.25 34 35 4' - 0" 36 37 4' - 0 9/16" 4.5625 38 39 6' - 5 1/2" 31.5
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
I understand what the 1 & 2 are doing, but I am struggling to get the info in the proper cells.
the Dimension (1' - 0 1/2") is in Cell I1527. Can you help me with the proper formula?
Sorry, I am just stupid to some of these things.
This seems to work on everything except the ones where it does not have the 16ths. Is there something that could be added to take care of this?
Actually, it is not working in every case. Look at the last one you sent, it is coming out to 31.5 for 6' - 5 1/2".
See if this one will give you better results
Formula:Please Login or Register to view this content.
v A B 1 0' - 2 3/8" 2.375 2 1' - 1 11/16" 13.6875 3 0' - 6 1/16" 6.0625 4 5 1' - 0 1/2" 12.5 6 7 1' - 6 1/4" 18.25 8 9 1' - 8 1/4" 20.25 10 11 1' - 11 15/16" 23.9375 12 1' - 11 15/16" 23.9375 13 14 8' 5" 15 16 2' - 1 11/16" 25.6875 17 2' - 1 11/16" 25.6875 18 19 2' - 1 15/16" 25.9375 20 2' - 1 15/16" 25.9375 21 2' - 1 15/16" 25.9375 22 23 2' - 7 3/4" 31.75 24 25 2' - 11 3/8" 35.375 26 2' - 11 3/8" 35.375 27 28 2' - 11 15/16" 35.9375 29 2' - 11 15/16" 35.9375 30 31 3' - 1 1/8" 37.125 32 33 3' - 11 3/4" 47.75 34 35 4' - 0" 48 36 37 4' - 0 9/16" 48.5625 38 39 6' - 5 1/2" 77.5
Everything seems to work great except when I come to a dimension like the following
1' - 7" This returns a value of 5.
Can you also provide a solution for this instance?
Thank you very much for your help.
There are some of them that can't be resolved like: 1' - 7" or 8' 5" At least I couldn't find a solution for them yet.
The solution I proposed in post #6 (text to columns followed by a couple of substitute() formulas) works for those cases -- it just doesn't all fit into a single cell.
Would that work, or must it be a single cell mega formula?
Thank you for your help.
I would prefer one formula, but I have no clue how to write it. Thank you for all of your help.
Then I guess (at least for me) that the answer to the OP question is "No, there is not an easy function."
I haven't got time to piece a complete function together, but I could see adding the FIND() function to these text functions to help separate feet from inches https://support.office.com/en-us/art...3-d0d89b0a0628
LEFT(text,FIND("'",text)-1) should return the feet number.
Something like MID(text,FIND("-",text)+2,FIND(CHAR(34),text)-FIND("-",text)-2) should find the inches number.
Then, those two variations of LEFT() and MID() fit into the summation like above =VALUE(LEFT(...))+VALUE(MID(...))/12
I haven't got time right now to test and fine tune those FIND() functions to make sure the correct stuff will always be returned, but one should be able to coax something like that to give you the result you want.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks