+ Reply to Thread
Results 1 to 9 of 9

=countif

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    =countif

    I have this formula
    =COUNTIF(P4:P1800, "<>Reviewed")
    The data so far are only in the cells from P4 to P8
    the rest are blank, and I made sure to use Clear All for cells beyond P8

    However the count is not accurate, but if i limit the range to P4:P8, i get more accurate count !

    Why is that, and how can i keep it more dynamic, with no need to adjust the range every time more cells beyond P8 has data.

  2. #2
    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
    52,933

    Re: =countif

    that is because a blank cell does indeed "not equal to" Reviewed. try using countifS() and include <>""
    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

  3. #3
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: =countif

    Maybe:

    =COUNT(P4:P1800)-COUNTIF(P4:P1800, "=Reviewed")

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: =countif

    I am trying

    =COUNTIFS(P4:P1800, "<>Reviewed", P4:P1800, "<>""")

    But Excel is popping with a formula error which i am not able to resolve

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: =countif

    I applied this correction

    =COUNTIFS(P4:P80,"<>""", P4:P80,"<>Reviewed")

    but still the count is not accurate

  6. #6
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: =countif

    I tested the old one and it worked. When I tested "<>""" it was somehow still counting blank cells because it was looking for "" and not a blank.

    Try:

    =COUNTIFS(P4:P80,"<>", P4:P80,"<>Reviewed")

  7. #7
    Registered User
    Join Date
    11-13-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    5

    Re: =countif

    Please try this
    [code]
    =countif(P4:P1800,"<>")
    [code]
    or if you only want to count cells with data other then blank
    =counta(P4:P1800)

  8. #8
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: =countif

    This one works good

    =COUNTIFS(P4:P80,"<>", P4:P80,"<>Reviewed")

  9. #9
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: =countif

    Maybe:
    =COUNT(P4:P1800)-COUNTIF(P4:P1800, "=Reviewed")
    It was giving a Negative 1794
    But thanks for getting back to me

+ 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