+ Reply to Thread
Results 1 to 8 of 8

how to remove the unwanted zero in a cell in Text properties

  1. #1
    Registered User
    Join Date
    01-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2002, 2010
    Posts
    42

    Question how to remove the unwanted zero in a cell in Text properties

    Here are the values in A1 and A2

    Cell A1 (format: Number): 259.0
    Cell A2 (format: Text): 259.0
    Cell A3 (format: Text): 259.0000

    But when I enter some codes into cells A3, A4 and A5, I notice that there are some difference after I have typed in some codes:

    in cell A4 (format: General),
    Please Login or Register  to view this content.
    , and I see the value = 259, the .0 disappears

    in cell A5 (format: General),
    Please Login or Register  to view this content.
    , and I see the value = 259.0, the .0 does not disappear

    in cell A6 (format: General),
    Please Login or Register  to view this content.
    , and I see the value = 259.0000, the .0 does not disappear

    Is it possible to use Trim() or other functions to remove the unwanted zeros in in cells A5 and A6 when the zeros in the Text fields are not fixed (e.g. 259.00, 259.00000)?


    Please help me!

    Kitty

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to remove the unwanted zero in a cell in Text properties

    Hi

    Trim removes spaces not zeroes. You could use =A2+0 instead
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    01-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2002, 2010
    Posts
    42

    Re: how to remove the unwanted zero in a cell in Text properties

    Quote Originally Posted by xlnitwit View Post
    Hi

    Trim removes spaces not zeroes. You could use =A2+0 instead

    I don't understand what you said, xlnitwit.
    Could you tell me where I should type in =A2+0 ?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to remove the unwanted zero in a cell in Text properties

    In A5 for example.

  5. #5
    Registered User
    Join Date
    01-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2002, 2010
    Posts
    42

    Re: how to remove the unwanted zero in a cell in Text properties

    Quote Originally Posted by xlnitwit View Post
    In A5 for example.
    Thank you for your help, xlnitwit.
    I have typed in =A2+0 in cell A5, and then I see all the zeros are gone,
    your suggested solution works like a charm.
    I am thinking why the question can be solved by just adding plus zero in the code.
    Could you tell me the secret behind this please, xlnitwit?

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to remove the unwanted zero in a cell in Text properties

    It coerces the text to a true number value, which will not show unnecessary decimal places by default.

  7. #7
    Registered User
    Join Date
    01-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2002, 2010
    Posts
    42

    Re: how to remove the unwanted zero in a cell in Text properties

    Quote Originally Posted by xlnitwit View Post
    It coerces the text to a true number value, which will not show unnecessary decimal places by default.
    Thank you so much for your help, xlnitwit!

    I want to search on Google for some more examples about +0.
    Could you tell me the name of this technique ( = A2+0) please?

    I searched on Google with this keywords but it returned nothing examples I wanted to learn:

    examples+EXCEL VBA + plus zero

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,460

    Re: how to remove the unwanted zero in a cell in Text properties

    +0 (or *1 or /1 or ^1 or other math identity operation) is one of many strategies to "convert number stored as text to number". For more discussion and to see other possible techniques, put "convert number stored as text to number Excel" into Google. A couple of results I came up with:
    https://support.office.com/en-us/art...1-c5bad0f0a885
    http://www.excelfunctions.net/conver...to-number.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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: 4
    Last Post: 10-14-2021, 06:00 PM
  2. want to remove unwanted text from my sheet
    By notbanme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2016, 01:52 AM
  3. Replies: 7
    Last Post: 05-15-2015, 11:57 AM
  4. Remove unwanted characters in a cell
    By 136Village in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2014, 01:14 PM
  5. [SOLVED] Remove unwanted text/ numbers from name
    By MATU70 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 05-13-2014, 02:31 PM
  6. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  7. Excel 2007 : Remove Unwanted Text from Cells
    By rickygzz in forum Excel General
    Replies: 6
    Last Post: 08-01-2011, 10:28 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