+ Reply to Thread
Results 1 to 7 of 7

Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halves?

  1. #1
    Registered User
    Join Date
    07-07-2018
    Location
    Philadelphia
    MS-Off Ver
    365
    Posts
    3

    Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halves?

    Looking for formatting which will format a number with sixteenths, but if it rounds down to eighths will do so, and if it rounds down to quarters or halves, will do so.

    So 3.3125 will display as 3 5/16
    But 3.375 will display as 3 3/8, NOT as 3 6/16
    And 3.25 will display as 3 1/4 NOT as 3 2/8 or 3 4/16
    Last edited by parislovett; 11-17-2023 at 11:26 AM. Reason: error

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    What do you want to do if the number is not precisely a multiple of 1/16?

    For your examples:

    Custom format, Fractions, two digits

    Custom format fractions two digits.jpg
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,361

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    Jeff beat me to it
    If things don't change they stay the same

  4. #4
    Registered User
    Join Date
    07-07-2018
    Location
    Philadelphia
    MS-Off Ver
    365
    Posts
    3

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    Quote Originally Posted by 6StringJazzer View Post
    What do you want to do if the number is not precisely a multiple of 1/16?

    For your examples:

    Custom format, Fractions, two digits

    Attachment 849865
    I want to limit it to denominators of /16, /8, /4 or /2. Is there a way to do that?

  5. #5
    Registered User
    Join Date
    07-07-2018
    Location
    Philadelphia
    MS-Off Ver
    365
    Posts
    3

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    Actually I do need to limit it to denominators of /16, /8, /4 or /2. Is there a way to do that? (This is to match standard rulers in the USA).

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

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    Number formatting alone cannot do this (display all fractions with several specified denominators).

    If you can force the value to be an exact multiple of 1/16 (using an MROUND() function, for example), then you can constrain the actual value to be an even multiple of 1/16, and the number formatting described by 6StringJazzer will take care of displaying that value as a fraction in its most simplified form.

    Would you be allowed to round the value to the nearest 1/16?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Inch fraction formatting which adjusts from sixteenths to eighths to quarters to halve

    Here is the method described by MrShorty

    Values as displayed
    A
    B
    C
    D
    1
    Original Number
    Fraction
    Rounded to nearest 16th
    Rounded Fraction
    2
    3.3125
    3 5/16
    3.3125
    3 5/16
    3
    3.375
    3 3/8
    3.375
    3 3/8
    4
    3.25
    3 1/4
    3.25
    3 1/4
    5
    3.5
    3 1/2
    3.5
    3 1/2
    6
    3.333
    3 1/3
    3.3125
    3 5/16
    7
    3.666
    3 2/3
    3.6875
    3 11/16

    Underlying formulas
    A
    B
    C
    D
    1
    Original Number
    Fraction
    Rounded to nearest 16th
    Rounded Fraction
    2
    3.3125
    =A2
    =MROUND(A2,1/16)
    =C2
    3
    3.375
    =A3
    =MROUND(A3,1/16)
    =C3
    4
    3.25
    =A4
    =MROUND(A4,1/16)
    =C4
    5
    3.5
    =A5
    =MROUND(A5,1/16)
    =C5
    6
    3.333
    =A6
    =MROUND(A6,1/16)
    =C6
    7
    3.666
    =A7
    =MROUND(A7,1/16)
    =C7

+ 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. Replies: 12
    Last Post: 02-02-2021, 01:55 AM
  2. [SOLVED] Convert Feet - Inch - Inch Fraction string into numerical value
    By plans in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-25-2017, 11:29 PM
  3. Replies: 2
    Last Post: 02-17-2017, 10:50 AM
  4. [SOLVED] Trying to turn fractions from sixteenths to quarters, halves, etc
    By brianfromla in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-25-2016, 03:43 PM
  5. [SOLVED] decimal feet to feet-inch-sixteenths conversion
    By tv in forum Excel General
    Replies: 3
    Last Post: 06-01-2015, 12:48 AM
  6. [SOLVED] formula for converting decimal to inch & fraction
    By davepatrob in forum Excel General
    Replies: 1
    Last Post: 12-31-2005, 11:15 AM
  7. convert decimal to inch & fraction
    By davepatrob in forum Excel General
    Replies: 1
    Last Post: 12-31-2005, 01:10 AM

Tags for this Thread

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