+ Reply to Thread
Results 1 to 5 of 5

Decimal Places in a formula

Hybrid View

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Crawley
    MS-Off Ver
    Excel 2003
    Posts
    3

    Decimal Places in a formula

    Type 1.101 in A1

    In A2 type round(A1,2)

    The result is 1.1

    I need the result to be 1.10

    This is part of a longer formula with several of these occurances and I don't want to go down the route of finding the length and then adding a '0' if it's short. Does anyone know a better/easier way?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Decimal Places in a formula

    Hi,

    Select the cells where you need two decimal places.

    Do Format > Cells > Number > Number > demical Places > 2
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    06-05-2009
    Location
    Crawley
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Decimal Places in a formula

    Doesn't work.

    round(A1,2) & " " & round(B1,1)

    This is more like the formula I'm using. Also some may need to be to 1 decimal place and others to 2

  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: Decimal Places in a formula

    =TEXT(ROUND(A1,2),"0.00")&" "&TEXT(ROUND(B1,1),"0.0")
    perhaps
    "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
    Registered User
    Join Date
    06-05-2009
    Location
    Crawley
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Decimal Places in a formula

    Quote Originally Posted by martindwilson View Post
    =TEXT(ROUND(A1,2),"0.00")&" "&TEXT(ROUND(B1,1),"0.0")
    perhaps
    Genius. Thanks

+ 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