+ Reply to Thread
Results 1 to 2 of 2

number of decimal places

  1. #1
    Forum Contributor
    Join Date
    11-18-2008
    Location
    uk
    MS-Off Ver
    Excel 2003 and Excel 2010(sometimes)
    Posts
    139

    number of decimal places

    Hi Everyone

    just after a little guidance please

    i would like to do the following

    a1 enter a value of 0 then b1 to equal 0
    a1 enter a value of 0.0 then b1 to equal 1
    a2 enter a value of 0.00 then b1 to equal 2

    so basically it relates to the number of decimal places

    hope someone can help

    thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: number of decimal places

    if you enter 0,0.0,0.00 as number it will always be entered as 0 only with no decimal place unless you format EACH of them as number with 0,1,2 decimal places respectively . that is cumbersome.
    many ways to do this . easiest will be
    type
    '0
    '0.0
    '0.00
    that is single apostrophe followed by 0,or 0.0 or 0.00

    suppose you enter like this in A1 ,A2 and A3
    in B1 type this formula

    =IF( ISERROR(SEARCH(".",A1)),0,LEN(A1)-SEARCH(".",A1))
    copy B2 down. you will get what you want.

+ 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