+ Reply to Thread
Results 1 to 3 of 3

Decimal place if statement

  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Decimal place if statement

    Is there a way to look at a cell that has a numeric value and create code that is based on the number of decimal places the imputed number has? For example if I enter 90.32 I want a particular result, but if i enter 1.0574 i would like a different result.

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,520

    Re: Decimal place if statement

    In formula terms - you could base on LEN of string less position of period delimiter to determine decimal significance, eg:

    =MAX(0,LEN(A1)-FIND(".",A1&"."))

    That said if you're using cell formatting to determine no. of decimals to display, ie

    A1: 10.00

    then you would need to use CELL function (specifically "format" subfunction)

  3. #3
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Smile Re: Decimal place if statement

    thanks I will give that a try.

+ 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