+ Reply to Thread
Results 1 to 4 of 4

Extract decimal places from numbers?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2005
    Posts
    39

    Talking Extract decimal places from numbers?

    Hi all,

    As i need to check the decimal places of a number:

    1000.456

    For example:The first decimal place :4
    How can i extract it?

    =IF(AND(C10<>0,
    C10>J9),C10+J10,CEILING(POWER(SUM(1,(F5/1200)),F3)*(F5/1200)*(C4/(POWER(SUM(1,(F5/1200)),F3)-1)),1))

    The statement above results to:
    =11514.615

    I want to extract the first,second and third decimal place from this formula,then add on some if statements.How can i do it?Thanks a lot

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    A crude method:

    Suppose your number 1000.456 is in cell A1 then the following 3 formulae give you the 1st, 2nd and 3rd decimal numbers:
    =INT((A1-INT(A1))*10)
    =INT(((A1-INT(A1))*10-INT((A1-INT(A1))*10))*10)
    =INT((((A1-INT(A1))*10-INT((A1-INT(A1))*10))*10-(INT(((A1-INT(A1))*10-INT((A1-INT(A1))*10))*10)))*10)


    - Mangesh

  3. #3
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Another method if the number in cell A1 is text and not a formula:

    =MID($A$1,FIND(".",$A$1)+1,1)
    =MID($A$1,FIND(".",$A$1)+2,1)
    =MID($A$1,FIND(".",$A$1)+3,1)


    - Mangesh

  4. #4
    Registered User
    Join Date
    03-09-2005
    Posts
    39
    Thanks a lot!!!!

+ 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