+ Reply to Thread
Results 1 to 17 of 17

Custom cell formatting

  1. #1
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Custom cell formatting

    I have cells with the following formula in them
    =J19&" x "&K19&""&" x "&L19&"" and the cells display this 0.25 x 19.0625 x 30.25

    I cant figure out how to set up the custom formatting to display 3/4 x 19-1/16 x 30-1/4
    The first set of fractions will always be 1/16,1/4,1/2 or 3/4
    The 2nd and 3rd set of fractions will always have a number first then the fraction or just a number.

    Thanks in Advance

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Custom cell formatting

    c9: =TEXT(B9,"###/##") where b9 is .25

    b10: 19.0625 so c10 =TRUNC(B10)&" "&TEXT(B10-TRUNC(B10),"###/##")

  3. #3
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Thank for your reply rcm

    Im an excel amateur I dont really understand what I need to to with what you provided. Could please explain?

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    To format 0.25 as 1/4 you have to go to Format Cells and select Fraction, As quarters.
    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

  5. #5
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Quote Originally Posted by AlKey View Post
    To format 0.25 as 1/4 you have to go to Format Cells and select Fraction, As quarters.
    I know that, but I also have text in the same cell as show in the formula in my first post. It does not work if I simply use the fraction format.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    You can't have it with custom formatting to display 3/4 x 19-1/16 x 30-1/4

  7. #7
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Could I have (3/4) (19-1/16) (30-1/4)
    If yes, how would I do that?
    Thanks

  8. #8
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Custom cell formatting

    try this and look at line 19
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Custom cell formatting

    Please Login or Register  to view this content.
    I introduced the dashes (-)

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    Try this

    =TEXT(MOD(J19,1),"#/#")&" x "&TEXT(INT(K19),"#-")&TEXT(MOD(K19,1),"#/##")&" x "&TEXT(INT(L19),"#-")&TEXT(MOD(L19,1),"#/##")

  11. #11
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Thanks Alkey your formula is exactly what I needed.

    Thank You rcm yours was real close and I could have made it work.

    Thanks to you both!! Rock Stars!!

  12. #12
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Custom cell formatting

    you are welcome and happy holidays!!!

  13. #13
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    You're welcome and thank you for your feedback!

  14. #14
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Upon further review when I have a whole number with a fraction the formula works great.

    When I have just the whole number alone its displays like this 3-0/1

    Is it possible to make it like 3/4 x 3 x 18-1/2

  15. #15
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    Try this adjusted formula

    =TEXT(MOD(J19,1),"#/#")&" x "&IF(MOD(K19,1)=0,K19,TEXT(INT(K19),"#-")&TEXT(MOD(K19,1),"#/##"))&" x "&TEXT(INT(L19),"#-")&TEXT(MOD(L19,1),"#/##")

    and just in case other cell have whole numbers:

    =IF(MOD(J19,1)=0,J19,TEXT(MOD(J19,1),"#/#"))&" x "&IF(MOD(K19,1)=0,K19,TEXT(INT(K19),"#-")&TEXT(MOD(K19,1),"#/##"))&" x "&IF(MOD(L19,1)=0,L19,TEXT(INT(L19),"#-")&TEXT(MOD(L19,1),"#/##"))
    Last edited by AlKey; 12-27-2013 at 09:01 PM.

  16. #16
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: Custom cell formatting

    Im going with the 2nd formula it works perfect in all cells. Many Thanks!!!

  17. #17
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Custom cell formatting

    You're welcome

+ 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. Custom Cell Formatting
    By rushdh in forum Excel General
    Replies: 1
    Last Post: 05-16-2013, 02:09 PM
  2. Custom Cell Formatting
    By novamustangs in forum Excel General
    Replies: 1
    Last Post: 02-07-2007, 11:46 AM
  3. Cell Custom Formatting
    By drawlings in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2006, 07:45 AM
  4. [SOLVED] Custom formatting for a cell
    By brucefrank in forum Excel General
    Replies: 2
    Last Post: 09-28-2005, 10:05 PM
  5. custom cell formatting
    By Tim in forum Excel General
    Replies: 2
    Last Post: 03-14-2005, 01:06 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