+ Reply to Thread
Results 1 to 3 of 3

decimal places-optional cell formatting

  1. #1
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    decimal places-optional cell formatting

    Is it possible to format cells as 'show me the decimal places, but only if they're there'? That way $2.00 is $2 but $2.34 is $2.34.

    I would use

    =if(A1=(last 2 digits are zeros),A1 but without the zeros,A2)

    But how do I set this up?

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: decimal places-optional cell formatting

    In cell format (Ctrl+1) use this custom format

    $General
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: decimal places-optional cell formatting

    Halfway there. What about keeping the comma separators, and either both or neither decimal places? So what's now $1200.5 becomes $1,200.50?

+ 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. formatting of a cell to 2 decimal places
    By JohnD0e in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-02-2010, 11:11 PM
  2. Formatting decimal places
    By thetallguy0 in forum Excel General
    Replies: 2
    Last Post: 03-04-2008, 09:03 AM
  3. conditonally formatting decimal places
    By BigMikeGallagher in forum Excel General
    Replies: 0
    Last Post: 04-06-2006, 01:10 PM
  4. [SOLVED] formatting decimal places in code
    By cherman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2006, 02:30 PM
  5. Formatting a cell to display varying decimal places.
    By JayE in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2005, 07:06 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