Closed Thread
Results 1 to 7 of 7

function to find if a number is whole

  1. #1
    ::Cory::
    Guest

    function to find if a number is whole

    Does anyone know of a function to determine if a number is a whole integer
    and not a decimal place?

    I want to target a cell (that has a sum value in it) and create an if
    statement if it's a whole number or not.

    ::CORY::



  2. #2
    SteveW
    Guest

    Re: function to find if a number is whole

    Assume A1 has number in it

    =3Dif( INT(a1)=3Da1, True, False)

    On Tue, 15 Aug 2006 20:05:56 +0100, ::Cory:: <[email protected]> wro=
    te:

    > Does anyone know of a function to determine if a number is a whole =


    > integer
    > and not a decimal place?
    >
    > I want to target a cell (that has a sum value in it) and create an if
    > statement if it's a whole number or not.
    >
    > ::CORY::
    >
    >




    -- =

    Steve (3)

  3. #3
    Niek Otten
    Guest

    Re: function to find if a number is whole

    =MOD(A1,1)=0

    Returns TRUE or FALSE

    --
    Kind regards,

    Niek Otten
    Microsoft MVP - Excel

    "::Cory::" <[email protected]> wrote in message news:%[email protected]...
    | Does anyone know of a function to determine if a number is a whole integer
    | and not a decimal place?
    |
    | I want to target a cell (that has a sum value in it) and create an if
    | statement if it's a whole number or not.
    |
    | ::CORY::
    |
    |



  4. #4
    ::Cory::
    Guest

    Re: function to find if a number is whole

    Unless I am dense, neither of these replies worked.

    A1 value is 4.00 on my sheet is that my problem?

    ::CORY::



    "::Cory::" <[email protected]> wrote in message
    news:%[email protected]...
    > Does anyone know of a function to determine if a number is a whole integer
    > and not a decimal place?
    >
    > I want to target a cell (that has a sum value in it) and create an if
    > statement if it's a whole number or not.
    >
    > ::CORY::
    >




  5. #5
    ::Cory::
    Guest

    Re: function to find if a number is whole

    Nevermind. I found my error.

    Thanks for the fast help guys!

    ::CORY::


    "::Cory::" <[email protected]> wrote in message
    news:%[email protected]...
    > Unless I am dense, neither of these replies worked.
    >
    > A1 value is 4.00 on my sheet is that my problem?
    >
    > ::CORY::
    >
    >
    >
    > "::Cory::" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Does anyone know of a function to determine if a number is a whole
    >> integer and not a decimal place?
    >>
    >> I want to target a cell (that has a sum value in it) and create an if
    >> statement if it's a whole number or not.
    >>
    >> ::CORY::
    >>

    >
    >




  6. #6
    Niek Otten
    Guest

    Re: function to find if a number is whole

    <A1 value is 4.00>

    It probably isn't; 4.00 is what it shows, not what the value is. Format A1 as General and widen the column to its maximum. What do
    you see?

    --
    Kind regards,

    Niek Otten
    Microsoft MVP - Excel


    "::Cory::" <[email protected]> wrote in message news:%[email protected]...
    | Unless I am dense, neither of these replies worked.
    |
    | A1 value is 4.00 on my sheet is that my problem?
    |
    | ::CORY::
    |
    |
    |
    | "::Cory::" <[email protected]> wrote in message
    | news:%[email protected]...
    | > Does anyone know of a function to determine if a number is a whole integer
    | > and not a decimal place?
    | >
    | > I want to target a cell (that has a sum value in it) and create an if
    | > statement if it's a whole number or not.
    | >
    | > ::CORY::
    | >
    |
    |



  7. #7
    SteveW
    Guest

    Re: function to find if a number is whole

    If the value is 4.0 and displayed as 4.00 - no problem
    if on the other hand the value is 4.001 and formated to show 2 decimal =

    places then yes it's correct

    modify the formula to this

    =3Dif( abs(int(a1)-a1)<0.000001, true, false)

    You can *alter the accuracy* by altering the 0.000001

    Steve


    On Tue, 15 Aug 2006 20:22:16 +0100, ::Cory:: <[email protected]> wro=
    te:

    > Unless I am dense, neither of these replies worked.
    >
    > A1 value is 4.00 on my sheet is that my problem?
    >
    > ::CORY::
    >
    >
    >
    > "::Cory::" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Does anyone know of a function to determine if a number is a whole =


    >> integer
    >> and not a decimal place?
    >>
    >> I want to target a cell (that has a sum value in it) and create an if=


    >> statement if it's a whole number or not.
    >>
    >> ::CORY::
    >>

    >
    >




    -- =

    Steve (3)

Closed 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