+ Reply to Thread
Results 1 to 15 of 15

Deleting numbers after decimal point

  1. #1
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Deleting numbers after decimal point

    Hi I am trying to delete the numbers that follow the decimal point but I am struggling a bit. I have tried the replace ".*" option but it is joining the decimal not deleting it. For example :
    A1 = 134.4678
    A2 = 42.7777889
    ect
    I would like to be able to delete all the numbers after the decimal point so the outcome would be:
    A1 = 134
    B1 = 42
    ect

    Many thanks
    Last edited by greekboyuk; 02-03-2011 at 02:14 PM.

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

    Re: Deleting numbers after decimal point

    I just tried replacing .* with nothing and it worked fine.

    Are the numbers hard-coded or formula results.
    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.

  3. #3
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Deleting numbers after decimal point

    hi, the numbers are hard coded. leaving it blank doesnt work either as it is not deleting the numbers after the decimal point but joining them together

    thanks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Deleting numbers after decimal point

    works fine for me on either numbers or text numbers
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Deleting numbers after decimal point

    I don't know why is not working. I tried to simply enter a random number and it did work however on the sheet with the other numbers it doesn't. I was wondering whether is a different situation when the formatting is exported from the server as after the decimals I have noticed there is an invisible mb. So for example A1 is showing 1325.478843208 MB and the mb is not editable.

    Thanks

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Deleting numbers after decimal point

    what is the format of the cells?

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Deleting numbers after decimal point

    Hi I am trying to delete the numbers that follow the decimal point but I am struggling a bit. I have tried the replace ".*" option but it is joining the decimal not deleting it.
    Did you add the quotes? If so, delete them

  8. #8
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Deleting numbers after decimal point

    34.4678 34
    42.7777889 42
    =LEFT(A1,FIND(".",A1)-1)+0 works and will leave you with numbers as opposed to text
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Deleting numbers after decimal point

    still need to find where the mb is coming from
    1325.478843208 MB
    post a workbook with an example

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Deleting numbers after decimal point

    Hi,

    Have you considered =INT(A1) in a helper column, copied down and then copy the whole helper column and paste back to A1 as special values?

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  11. #11
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Deleting numbers after decimal point

    Hi thank you Scottylad and Richard it worked perfectly. I figured out another way which you copy and paste values and use the "round".

    I wasn't able to check the format of the cells as I couldnt go in "format cell" properties neither use shortcut "ctrl+1" the only thing that allowed me to do was copy "ctrl+c" .

    Thank you very much for all your support

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Deleting numbers after decimal point

    I wasn't able to check the format of the cells as I couldnt go in "format cell"
    that begs the question ,why?

  13. #13
    Registered User
    Join Date
    01-26-2010
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Lightbulb Re: Deleting numbers after decimal point

    You know the quickest way for this is:

    =ROUND(A1,0)

    Then just 'copy' and 'paste special' - values.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Deleting numbers after decimal point

    Welcome to the forum, Kim.

    ROUND and INT give different results.
    Entia non sunt multiplicanda sine necessitate

  15. #15
    Registered User
    Join Date
    05-22-2013
    Location
    Namibia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Deleting numbers after decimal point

    Best solution is first insert another column next your data you want to edit. go to the Data tab. Click TEXT TO COLUMN. Select the fixed space option. And put a line where you want the number to cutoff. finish. vwallah you have two columns. and everything after the fixed space is simply place in the next column which you can delete. Only way it worked for me.

+ 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