+ Reply to Thread
Results 1 to 9 of 9

COUNTIFS Function returning wrong data

  1. #1
    Registered User
    Join Date
    01-05-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    COUNTIFS Function returning wrong data

    I have a problem with a spreadsheet. The spreadsheet is a call log that keeps track of inbound/outbound calls per employee. I'm trying to keep a general calls tab that shows a monthly inbound/outbound calls summary per employee. The perimeters for the formula are: employee's last name, inbound/outbound, date range to show monthly results. The formula will return one value for an employee, but when I go to the tab and actually count, I get a different number. Any thoughts on why the countifs formula would be returning different numbers than what is actually listed?

    =COUNTIFS('Call Summary'!$C:$C,$A2,'Call Summary'!$H:$H,"inbound",'Call Summary'!$G:$G,"<="&DATE(2012,1,31),'Call Summary'!$G:$G,">="&DATE(2012,1,1))

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: COUNTIFS Function returning wrong data

    Could some of the data have leading/trailing spaces that look like say inbound, but don't match in the formula?

  3. #3
    Registered User
    Join Date
    01-05-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: COUNTIFS Function returning wrong data

    That was definitely one of the first things I thought. I went back to the tab and did a massive copy and paste on both the inbound and outbound to ensure there weren't any leading/trailing spaces.

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: COUNTIFS Function returning wrong data

    Post the workbook then; just guessing otherwise.

  5. #5
    Registered User
    Join Date
    01-05-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: COUNTIFS Function returning wrong data

    Here it is. I have the second tab sorted by employee wood and outbound, ran a simple countif on "outbound" and the numbers don't match. Just doesn't match what shows on the first tab.
    Attached Files Attached Files

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: COUNTIFS Function returning wrong data

    The figures in Monthly Calls C2 & d2 look fine to me.

  7. #7
    Registered User
    Join Date
    01-05-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: COUNTIFS Function returning wrong data

    I show that they are both less than what is on the call summary tab. Filter by Anfang and outbound, count them, and compare them to the numbers on the first tab.

  8. #8
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: COUNTIFS Function returning wrong data

    I know what it is. Some of the 31st Jan dates have time beyond 00:00:00 so comparing against Date(2012,1,31) doesn't include them.

    Use

    =COUNTIFS('Call Summary'!$C:$C,$A2,'Call Summary'!$H:$H,"inbound",'Call Summary'!$G:$G,"<="&DATE(2012,1,31)+TIME(23,59,59),'Call Summary'!$G:$G,">="&DATE(2012,1,1))

  9. #9
    Registered User
    Join Date
    01-05-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: COUNTIFS Function returning wrong data

    OH! That makes total sense. I thought it had to be something with those date ranges, but it was confusing the heck outta me. I really appreciate all your support!

+ 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