+ Reply to Thread
Results 1 to 11 of 11

Remove trailing zeros

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    West Virginia, USA
    MS-Off Ver
    Excel 2000
    Posts
    31

    Remove trailing zeros

    Now I have a decimal column and I would like to remove all of the trailing zeros. It is using the number format. How do I accomplish this?
    Last edited by Garren1013; 01-13-2010 at 01:35 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Anyway to remove trailing zeros?

    Did you try,

    0.##
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-13-2010
    Location
    West Virginia, USA
    MS-Off Ver
    Excel 2000
    Posts
    31

    Re: Anyway to remove trailing zeros?

    I just used that but it still leaves a . on whole numbers. For example, if I have just the number "2" type in, then it will show "2."

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Anyway to remove trailing zeros?

    you better explain what you have and what you want with example, because I can not see any trailing zeros in 2.

  5. #5
    Registered User
    Join Date
    01-13-2010
    Location
    West Virginia, USA
    MS-Off Ver
    Excel 2000
    Posts
    31

    Re: Anyway to remove trailing zeros?

    I want my column to look like this:

    2.125
    2
    4.625
    3.75
    1
    5.0625


    Currently, it looks like this:

    2.1250
    2.0000
    4.6250
    3.7500
    1.0000
    5.0625


    After doing what you suggested, I typed in "0.####" into the custom category, and it looks like this:

    2.125
    2.
    4.625
    3.75
    1.
    5.0625



    Notice the "." after the whole numbers. How do I get rid of that?
    Last edited by Garren1013; 01-13-2010 at 12:53 PM.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Anyway to remove trailing zeros?

    So you want the decimal point removed as well.

    AFAIK that's not possible with a number format. If you leave the decimal point out the decimal values will be excluded.

  7. #7
    Registered User
    Join Date
    01-13-2010
    Location
    West Virginia, USA
    MS-Off Ver
    Excel 2000
    Posts
    31

    Re: Anyway to remove trailing zeros?

    Well, I just wanted the decimal point to be removed from whole numbers, because 2. just looks odd. You'd think there would be something in Excel to handle that.

    If it's not possible than I guess I'll have to deal with it.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Anyway to remove trailing zeros?

    Maybe missing something.. but if you currently are Formatted as Numbers, then wouldn't Format: General do that?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  9. #9
    Registered User
    Join Date
    01-13-2010
    Location
    West Virginia, USA
    MS-Off Ver
    Excel 2000
    Posts
    31

    Re: Anyway to remove trailing zeros?

    Quote Originally Posted by NBVC View Post
    Maybe missing something.. but if you currently are Formatted as Numbers, then wouldn't Format: General do that?

    Yes, that works. Thank you.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Anyway to remove trailing zeros?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  11. #11
    Registered User
    Join Date
    02-21-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Anyway to remove trailing zeros?

    I have a question concerning this post. Can you do this and also tell it to not using leading zero's? For instance if I have the following numbers: 8, 1.62, .42 I want them listed as shown. The 8 should not have a decimal, the 1.62 is fine, and the .42 should not have a leading 0.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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