+ Reply to Thread
Results 1 to 3 of 3

Conditional Count, Countif Problem

Hybrid View

LaFonson Conditional Count, Countif... 10-13-2011, 05:12 PM
TMS Re: Conditional Count,... 10-13-2011, 05:20 PM
TMS Re: Conditional Count,... 10-13-2011, 05:50 PM
  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    5

    Conditional Count, Countif Problem

    Hi all

    I am having the worst time trying to figure out, what I thought would be a simple function!!

    I need to have a count of how many cells have .5 in them and how many do not, whole numbers.

    I would like to have one formula to count all whole numbers, ex: 1,2,5,10, etc. And another formula to count all numbers that end in .5.

    So if I have cells that contain: 1.5,2,0.50, 4...My whole number count is 2 and my .50 count is 2.

    Thanks for any help and keeping me from pulling my hair out
    Last edited by LaFonson; 10-13-2011 at 05:48 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,463

    Re: Conditional Count, Countif Problem

    One way to count integers:

    =SUMPRODUCT(--(INT(A1:A5)=A1:A5),--(A1:A5<>""))

    And, to count numbers ending in .5:

    =SUMPRODUCT(--(A1:A5-INT(A1:A5)=0.5),--(A1:A5<>""))


    Regards
    Last edited by TMS; 10-13-2011 at 05:22 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,463

    Re: Conditional Count, Countif Problem

    Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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