+ Reply to Thread
Results 1 to 4 of 4

Tweak a custom number format (hiding decimal point)

  1. #1
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Tweak a custom number format (hiding decimal point)

    Hi,

    Hopefully this is an easy one. I have a cell with a custom number format 0.##.

    So if the result in this cell has one or two decimal places it will show those decimal places (e.g. 4.5, 4.55).
    However when the value is a whole number the decimal point is shown (e.g. '4.' instead of '4').

    This is the first time I've had the need to use a custom number format so not sure if it is something silly I've missed or not. Also this has only been checked in 2013 Excel so far and would need to be backward compatible to 2007.

    Any other workarounds would be greatly appreciated too.

    Thanks
    Harribone
    Say thanks, click *

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Tweak a custom number format (hiding decimal point)

    Hi,

    Here is one closest custom format : [=4]4;.##

    But the problem with above is when you enter 4 it will show as 4 only but if you enter any other number it will show decimal point.

    Also, Checked the below formula and if you can use formula in place, you can use the below formula:

    =IF(ROUND(A1,2)=INT(A1),TEXT(A1,"0"),TEXT(A1,"0.0#"))



    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Tweak a custom number format (hiding decimal point)

    Thanks pareshj!

  4. #4
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Tweak a custom number format (hiding decimal point)

    Please mark this thread as SOLVED and click * to say thanks.


    Regards,
    Paresh J

+ 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 number format code for hiding specific values on chart axes
    By rob_storrar in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 11-25-2012, 12:27 AM
  2. Replies: 2
    Last Post: 06-29-2012, 07:52 PM
  3. Format display decimal values but no decimal point
    By BecParko in forum Excel General
    Replies: 1
    Last Post: 10-18-2007, 04:42 AM
  4. Replies: 3
    Last Post: 03-18-2006, 02:25 PM
  5. [SOLVED] format inplied decimal point
    By c62ip64 in forum Excel General
    Replies: 8
    Last Post: 11-16-2005, 11:15 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