+ Reply to Thread
Results 1 to 15 of 15

display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

Hybrid View

6diegodiego9 display 14.0% as 14% and... 04-28-2022, 06:00 AM
Glenn Kennedy Re: display 14.0% as 14% and... 04-28-2022, 06:15 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 06:22 AM
menem Re: display 14.0% as 14% and... 04-28-2022, 07:25 AM
Glenn Kennedy Re: display 14.0% as 14% and... 04-28-2022, 07:39 AM
Roel Jongman Re: display 14.0% as 14% and... 04-28-2022, 07:46 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 08:07 AM
Glenn Kennedy Re: display 14.0% as 14% and... 04-28-2022, 08:16 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 08:25 AM
Roel Jongman Re: display 14.0% as 14% and... 04-28-2022, 08:26 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 10:18 AM
Glenn Kennedy Re: display 14.0% as 14% and... 04-28-2022, 10:58 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 11:21 AM
Glenn Kennedy Re: display 14.0% as 14% and... 04-28-2022, 11:29 AM
6diegodiego9 Re: display 14.0% as 14% and... 04-28-2022, 02:41 PM
  1. #1
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Question display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    How can I compose the number formatting to display percentages with one decimal except if it's 0?
    14.0% -> 14%
    14.1% -> 14.1%

    (I need to show them like that in a chart)

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Are these calculated values, or entered values? Formatting entered values as General does what you want. We need more context. Please see yellow banner (top).
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    General shows 14.0% as 1400 :-(

    They are calculated values

  4. #4
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    If you don't mind to use condition format.

    Data in D3

    use this condition for 14% (format string : 0%)
    =ROUND(MOD(D3*100,1),6)=0

    and this condition for 14.1% (format string : 0.#%)
    =Round(MOD(D3*100,1),6)>0

    Regards.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,498

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    you can use conditional formatting for this, since there is no example file I had to guess a bit on how you want it rounded.

    First step is to set your celformatting to show one decimal. which is the normal I assumed
    then make a conditional format (Cf) rule to show no decimals if it is a round number.

    I used the mod() function and round function to do that. you may need to play with the exact condition or use a roundup or rounddown function instead to get to the exact result you wnat.
    this formula wil round 0,04999 down to 0 and 0,05000 and up to 0,1

    =ROUND(MOD(B4*100;1);1)<0,05

    see example file for my formula in the CF
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Quote Originally Posted by Roel Jongman View Post
    you can use conditional formatting for this, since there is no example file I had to guess a bit on how you want it rounded.
    [...]
    see example file for my formula in the CF
    Thanks Roel!
    Conditional formatting was an interesting solution indeed but as I need the values to be displayed in a chart, it didn't help:

    Attachment 778541

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Can we have a sample FILE... not a picture of one?

  9. #9
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Quote Originally Posted by Glenn Kennedy View Post
    Can we have a sample FILE... not a picture of one?
    Sure. That's the same file already posted by Roal, with a default chart.

    Attachments feature don't work:
    Immagine.png

  10. #10
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,498

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    your attachment did not load..

    But the next best thing would then be to use text function for use in the chart. see my new example/

    I Used the formula of the CF in a cell combined with a text function.\

    you need a separate column to create the text labels for the x-axis.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Thanks Roel!
    Your solution converting it to text with formula
    =TEXT(B2;IF(ROUND(MOD(B2*100;1);1)<0,05;"0%";"0,0%"))
    is not ideal but likely the only available.
    However it's not working correctly for 13,97%, as it's still displayed as 14,0%

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    1. You did not read the instructions fully. There is NO mention of the attachments button in the explanation... because it does not work!!!

    2 Try this (format as General):

    =100*ROUND(E2,3)
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Quote Originally Posted by Glenn Kennedy View Post
    1. You did not read the instructions fully. There is NO mention of the attachments button in the explanation... because it does not work!!!
    Ok I now saw it. Thanks. I hope to not forget it.
    Quote Originally Posted by Glenn Kennedy View Post
    2 Try this (format as General):
    =100*ROUND(E2,3)
    It misses the "%"

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Format as General %
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    01-10-2018
    Location
    Italy
    MS-Off Ver
    Excel 365 (2021-01)
    Posts
    71

    Re: display 14.0% as 14% and 14.1% as 14.1% (remove insignificant decimals)

    Quote Originally Posted by Glenn Kennedy View Post
    Format as General %
    It works! Thanks so much!!!

+ 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. [SOLVED] Help with Formula to remove decimals
    By kgtrader in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-11-2020, 02:52 PM
  2. [SOLVED] Remove 2 decimals in number
    By JohnGreen2 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-11-2019, 06:02 PM
  3. [SOLVED] Cannot remove decimals from a number
    By Lermont in forum Excel General
    Replies: 5
    Last Post: 11-13-2014, 02:38 PM
  4. [SOLVED] Remove Decimals
    By cyndi in forum Excel General
    Replies: 1
    Last Post: 07-13-2006, 10:50 AM
  5. How to remove comma and decimals from a value
    By Send Object Command - Two attachments in forum Excel General
    Replies: 2
    Last Post: 11-10-2005, 07:20 PM
  6. [SOLVED] How do I display an insignificant 0 at the beginning of a number
    By nuttylocke in forum Excel General
    Replies: 3
    Last Post: 02-09-2005, 09:06 AM
  7. [SOLVED] How do I remove decimals of IP address in excel?
    By riffmastr in forum Excel General
    Replies: 3
    Last Post: 02-02-2005, 03:06 AM

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