+ Reply to Thread
Results 1 to 5 of 5

strip 0 after decimal

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2016 / Office: 365
    Posts
    37

    strip 0 after decimal

    Hi Experts,

    Please may I know how to convert XXXX.0YYY to XXXX.YYY (only if there is 0 after decimal else ignore)

    Example
    123.01 to 123.1
    23.0534 to 23.534
    23.23 to 23.23

    Thanks a ton.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    7,878

    Re: strip 0 after decimal

    If A1 is number
    Try
    =IF(MOD(A1,1)*10<1,INT(A1)+MOD(A1,1)*10,A1)

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2016 / Office: 365
    Posts
    37

    Re: strip 0 after decimal

    Hi @bebo021999
    Thank you and Brilliant!
    I wish I understand the logic, I have subscribed to the link.

    Thanks a ton

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2010
    Posts
    4,803

    Re: strip 0 after decimal

    Another way:

    =SUBSTITUTE(A1,".0",".")

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2016 / Office: 365
    Posts
    37

    Re: strip 0 after decimal

    Yeah, this is easy, I am so dumb. Thank you for confirming

+ 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] If Decimal Found then move the data from after decimal to before decimal
    By Zaeguzah in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-26-2020, 06:00 PM
  2. decimal field of a number is changing when I strip off the integer field.
    By whburling in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2017, 12:33 PM
  3. Paste two decimal number in excel without extra decimal places appearing
    By jeffery_frick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 07:49 PM
  4. Replies: 3
    Last Post: 07-05-2006, 01:57 PM
  5. Replies: 3
    Last Post: 03-18-2006, 02:25 PM
  6. [SOLVED] TAB STRIP
    By icebreaker914 in forum Excel General
    Replies: 1
    Last Post: 04-16-2005, 09:08 AM
  7. [SOLVED] tab strip
    By icebreaker914 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-16-2005, 09:08 AM

Tags for this Thread

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