+ Reply to Thread
Results 1 to 3 of 3

countif on specific cells not a range.

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    countif on specific cells not a range.

    Hi All,

    So I know how to do a countif but rather than using a range (eg: A20:A25) I want to do individual cells. (eg: A20,A21,A25,B25,C26) and count the amount of zeros.

    I have tried using the offset function but have had little luck

    =countif(range,criteria)

    =countif((A20,A21,A25,B25,C26) ,"-")

    =countif(cells(A20,A21,A25,B25,C26) ,"-")

    hopefully this makes sense.

    Cheers

  2. #2
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: countif on specific cells not a range.

    =sumproduct((a20=1)+(a21=1)+(a25=1)+(b25=1)+(c26=1))

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: countif on specific cells not a range.

    2007 has an added count function called countifS() (also sumifS(), averageifs(). it adds more flexibility to counting. try using that and see if it gives you what you want?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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