+ Reply to Thread
Results 1 to 8 of 8

Stop .0 in [number].0 being cuf off, when [number] could have several decimal places?

  1. #1
    Registered User
    Join Date
    07-29-2010
    Location
    Western Isles, Scotland, UK
    MS-Off Ver
    Excel 2003 & sometimes 2007
    Posts
    22

    Question Stop .0 in [number].0 being cuf off, when [number] could have several decimal places?

    Numbers entered into a set of cells may have between 1 and 5 decimal places. If it is 1 decimal place and it is between .1 and .9 it enters fine (e.g.12712.9). But if I try and enter e.g.13712.0 into a cell it changes to 13712 automatically.

    Any ideas how to stop it automatically cutting off the .0? Perhaps with a formula for forcing it to have between 1 and 5 decimal places..?

    Help very much appreciated!

    ETA
    0 is also a possible value, if that makes any difference
    Last edited by alba; 02-07-2011 at 12:13 PM.

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

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    format cell as number and pick as many places as you want
    "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

  3. #3
    Registered User
    Join Date
    07-29-2010
    Location
    Western Isles, Scotland, UK
    MS-Off Ver
    Excel 2003 & sometimes 2007
    Posts
    22

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    thanks for the reply;

    I'd like it to be automatically accepted because the final sheet will be a protected data entry form where the user doesn't do anything but type in the numbers

    so ideally I'd like it to be 'programmed in'...

  4. #4
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    If you format the whole column as indicated above, then it should be an acceptable solution as the users would not need to amend.

  5. #5
    Registered User
    Join Date
    07-29-2010
    Location
    Western Isles, Scotland, UK
    MS-Off Ver
    Excel 2003 & sometimes 2007
    Posts
    22

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    Thanks for the suggestion; unfortunately there may be anywhere between 1 and 5 decimal places so although I could format it to 5 decimal places I'd prefer it if (e.g.) 13712.0 stayed like that as entered, rather than got changed to 13712.00000

  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: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    try custom format #.####0

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    if 12712.10 should be listed as 12712.1 and 12712 as 12712.0 then you might try: #.0####

  8. #8
    Registered User
    Join Date
    07-29-2010
    Location
    Western Isles, Scotland, UK
    MS-Off Ver
    Excel 2003 & sometimes 2007
    Posts
    22

    Re: Stop .0 in [number].0 being cuf off, when [number] could have several decimal pla

    Thanks both for those suggestions; #.0#### works perfectly!

+ 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