+ Reply to Thread
Results 1 to 6 of 6

Count only cells with whole numbers, not decimals

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2011
    Posts
    2

    Count only cells with whole numbers, not decimals

    Hi,

    I am stuck trying to figure out a function to solve my problem. I have worksheets that have cells with whole numbers and cells that have decimal points (ie, 2.3456). I want to only count cells that have whole numbers and if the cell has decimal places, I want to count it as a zero. Is there a function for this? I was trying to use an If,Then function with the "int" but I havent been able to get it right. Can anyone help?

    Thanks,
    Rae

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Count only cells with whole numbers, not decimals

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Confirmed with Ctrl+Shift+Enter
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count only cells with whole numbers, not decimals

    @soren

    Heltal = integer
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Count only cells with whole numbers, not decimals

    A non array solution =SUMPRODUCT(--(MOD(Your_range,1)=0)*your_range)

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Count only cells with whole numbers, not decimals

    A non array solution
    Please Login or Register  to view this content.
    ( to count)
    Please Login or Register  to view this content.
    to sum

  6. #6
    Registered User
    Join Date
    07-09-2012
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Count only cells with whole numbers, not decimals

    Thank you!!

+ 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