+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Count If function not working correctly

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    West Side
    MS-Off Ver
    Excel 2007
    Posts
    3

    Count If function not working correctly

    I have entered a Count If function with two criteria on my spreadsheet, yet it is not counting based on my criteria correctly.

    Here are some things you may need to know:
    My data that is being counted is in a table format. When setting up the formula and selecting the data in a certain column to be counted (using the ctrl and shift keys) it named my range like so: =COUNTIFS(Table1[[#All],[WP]],"< .5",Table1[[#All],[AS status]],"Starter").

    It is only counting 21 instances, yet when I sort the data to "<.5" and "Starter" myself, it shows 22 instances.

    I have other COUNTIFS counting in the same range, but different criteria, and they are working fine.

    Here they are:
    =COUNTIFS(Table1[[#All],[WP]],"< .5",Table1[[#All],[AS status]],"Reserve")
    =COUNTIFS(Table1[[#All],[WP]],"< .5",Table1[[#All],[AS status]],"Commish")

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count If function not working correctly

    To best describe or illustrate your problem you would be better off attaching a dummy workbook.

    The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

  3. #3
    Registered User
    Join Date
    02-09-2011
    Location
    West Side
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Count If function not working correctly

    Quote Originally Posted by DonkeyOte View Post
    To best describe or illustrate your problem you would be better off attaching a dummy workbook.

    The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    Since this is a spreadsheet that I plan on sharing with the public anyways, I'm just going to upload the original.

  4. #4
    Registered User
    Join Date
    02-09-2011
    Location
    West Side
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Count If function not working correctly

    Alright. The file should open with a pink column, which is column H.

    Cell H396 is the problem child. I have even changed to formula's range, but it still counts incorrectly. The count formula is only counting 22 instances of data <.5 and the status of "Starter" (column I)

    Next, I went down the column that is in the range (column H, rows 3-389) and would delete and then undo the data in that column. Thinking, the one that isn't being counted won't change what is in H396. What I discovered is that the data in H30 is not being counted for some reason.

    Any reason as to why would be nice. I'm sure I can just add another row and move my data down, but I would like to find out why this has happened in case it occurs on a more serious scale/matter next time.

    Thanks,
    Jamie
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count If function not working correctly

    Jamie, a quick way to check these type of oddities is to add wildcards to see if the results change, eg:

    Please Login or Register  to view this content.
    the result changes to 22... this tells us one of your values in I3:I389 (I30) contains trailing spaces

    had the result stayed at 21 we would have moved the wildcard, "*Starter" to look/test for leading spaces

+ 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