+ Reply to Thread
Results 1 to 9 of 9

Help with COUNTIF Statements

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Lightbulb Help with COUNTIF Statements

    I have the following statement which basically counts the number of telephone calls in a ranged (in sheet 2) based on cell 'D58'. This works perfectly.

    =COUNTIF(Sheet2!L:L,D58)

    I now need to add an IF statement or another COUNTIF statement to the formula so I can count the number of calls over 30 seconds. The length of the call is in Column N in Sheet 2.

    I have no idea how to do this and would be grateful for any tips.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Help with COUNTIF Statements

    In Exel 2003 use SUMPRODUCT e.g.

    =SUMPRODUCT((Sheet2!L$2:L$100=D58)*(Sheet2!N$2:N$100>30))

    assumes column N data is shown as a number (of seconds) - if it's in time format change to

    =SUMPRODUCT((Sheet2!L$2:L$100=D58)*(Sheet2!N$2:N$100>TIME(0,0,30)))

    adjust ranges as required but you can't use the whole column
    Audere est facere

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Help with COUNTIF Statements

    Either:

    =COUNTIF(Sheet2!L:L,D58)+COUNTIF(Sheet2!N:N,">30")

    Or if you want calls over 30 seconds that have a coresponding value in Col L:

    =COUNTIFS(Sheet2!L:L,D58,Sheet2!N:N,">30")
    Say thanks, click *

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Help with COUNTIF Statements

    @ Harribone

    Might be worth pointing out, if they have Excel 2007 +, they could use COUNTIFS. As by their profile, Excel 2003! Mind you, that is nothing to go by!.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  5. #5
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Help with COUNTIF Statements

    Oops went straight in with a solution without realising what version this needed to work on!

  6. #6
    Registered User
    Join Date
    03-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help with COUNTIF Statements

    Excel 2003 is being used

  7. #7
    Registered User
    Join Date
    03-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help with COUNTIF Statements

    This statement is the one I'm after but it returns an error

    =COUNTIF(Sheet2!L:L,D58,Sheet2!N:N,">30")

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Help with COUNTIF Statements

    Hi vanurdi010310

    COUNTIF will not except multiple ranges and criteria.

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Help with COUNTIF Statements

    Did you try my suggestion in post #2? - SUMPRODUCT is a convenient function to use in Excel 2003 for "multi-condition" counting or summing

+ 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