+ Reply to Thread
Results 1 to 13 of 13

Decimal fraction

  1. #1
    Registered User
    Join Date
    01-24-2018
    Location
    Bloomington, IN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Decimal fraction

    So at our business we write up stone dimensions on the blocks as "10-1 x 3-3 x 4-6" for example, which would mean 10'1" x 3'3" x 4'6". If we were to put these dimensions in excel as "10.1 x 3.3 x 4.6" is there a formula that could convert them to 10.0833 x 3.25 x 4.5?

    Thanks for your help

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    how about this... =LEFT(A2,SEARCH(".",A2)-1)+(RIGHT(A2,1)/12)
    this is provided each are in their own cells, if they are all in one cell that will require a different approach because then excel will be treating them as text.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Decimal fraction

    With slight modification, the DOLLARDE() function is built for just this scenario: https://support.office.com/en-us/art...d-a38476693427 You would need to input two decimal places instead of 1; instead of 10.1, you would need to enter as 10.01 (10.1 would correspond to 10' 10"). Then =DOLLARDE(10.01,12) would return 10 1/12 or 10.08333....

    If you plan to enter that exact text string in a single cell, instead of each dimension in its own cell, you will need text function (LEFT(), MID(), RIGHT()) to extract the numeric portions of the text string. My inclination has always been to input each dimension in its own cell, though, avoiding this step.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    01-24-2018
    Location
    Bloomington, IN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Decimal fraction

    Each dimension has its own cell. So I have a column for each length, width, and height and a column that multiplies them all to give me cubic feet.
    Attached Files Attached Files
    Last edited by gfell153; 01-26-2018 at 10:24 AM.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    then my formula should work for you assuming your entries are 10.1 and not 10-1.

  6. #6
    Registered User
    Join Date
    01-24-2018
    Location
    Bloomington, IN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Decimal fraction

    Sambo kid that's exactly how I want it to work, thank you!!! Now I'm having a hard time plugging it into my workbook. I have attached it to my last reply

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    but you have no data in the sheet so I can tell where you need the formula or formulas. Whatever cell has the value, 10.1 for example, if it is in A2 then you'd need another cell to put the formula in so each location where you have a value you'll need another cell to convert it. To do it differently you likely will need a VBA solution (which is a skill set I don't have).

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Decimal fraction

    Either formula should work for you, a lot depends on exactly how you prefer to implement it.

    My formula will treat 10.1 and 10.10 as the same thing (10 feet 10 inches). It looks to me like Sambo Kid's formula may not capture the 10 or 11 inch numbers, since it is only extracting the rightmost character. None of your examples show numbers with 10 or 11 inch parts, so maybe this is not necessary. However, a robust feet.inch converter needs to be able to handle x.10 and x.11 values as well. For either formula, I would always use 2 digits in the decimal/inch portion (x.01, x.02, x.03,...,x.11). Sambo Kid's text based formula would simply need to edit the RIGHT() part of the function to take the 2 rightmost characters. Mine would not need any change to the formula.

    It is up to you how you want to proceed.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    Mr Shorty, 10.1 is (original post) 10 feet 1 inch.

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Decimal fraction

    @Sambo kid: that is correct as the OP described, but is 10.1 going to always mean 10 feet 1 inch? When you input 10.1 into Excel, Excel will automatically interpret that as a number (unless you force it to receive text input). If the OP enters 10.10 (10 feet 10 inches), this will look exactly the same to Excel as 10.1 (10 feet 1 inch), which can make it difficult to distinguish between 10 feet 1 inch (10.1) and 10 feet 10 inch (10.10) entries. Always entering 2 digits past the decimal eliminates this ambiguity and simplifies the processing. As I noted, this would be unnecessary if the OP will never (and I do mean never) need x.10 or x.11 values, but only the OP knows if that is a possibility. I am suggesting to the OP that she/he change that input so that 10 feet 1 inch is input as 10.01.

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    @MrShroty, I see your point. Mine works perfectly for the examples given but falls apart for 10 and 11 inch measurements. I could adjust it with a LEN statement or another search on the Right part to account for 11 but since excel drops trailing zeros unless it is text a .10 would screw it up. hmmm

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Decimal fraction

    So based on MrShorty's observations, this would work for all values from .1 to .11 inches. Including .10 (10 inches) IF you change the cell to text...
    =LEFT(A2,SEARCH(".",A2)-1)+((MID(A2,SEARCH(".",A2)+1,3)/12))
    but if you use dashes instead of decimals so that instead of 10.10 it would show as 10-10 and 3-6 then this would work for all instances too...
    =LEFT(A2,SEARCH("-",A2)-1)+((MID(A2,SEARCH("-",A2)+1,3)/12))

  13. #13
    Registered User
    Join Date
    01-24-2018
    Location
    Bloomington, IN
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Decimal fraction

    Thank you all very much for your help. Is there a way to implement this without having to use another cell to input the formula? Like you said maybe through a VBA solution? It would be easiest for our office clerk to be able to continue to use the 10-1, 10-2, 10-3.... 10-10, 10-11 format if at all possible. I just threw the decimal in there instead because I figured it would make it easier for you all.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. decimal to fraction
    By itselflearn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2015, 11:04 AM
  2. Converting decimal into a fraction via vba
    By pooky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2013, 08:32 PM
  3. [SOLVED] Fraction to Decimal
    By Michael D in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-13-2013, 03:21 PM
  4. [SOLVED] How do I turn a fraction into a decimal?
    By ad9051 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-04-2013, 01:04 PM
  5. How to display decimal as fraction and mm
    By STU22 in forum Excel General
    Replies: 1
    Last Post: 12-31-2012, 02:34 PM
  6. [SOLVED] Unusual fraction to decimal
    By honkin in forum Excel General
    Replies: 10
    Last Post: 07-03-2012, 08:35 PM
  7. Decimal to fraction conversion
    By Nunzio in forum Excel General
    Replies: 1
    Last Post: 10-16-2009, 12:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1