+ Reply to Thread
Results 1 to 4 of 4

Thread: Combining 'counta' and 'countif'

  1. #1
    Registered User
    Join Date
    10-01-2008
    Location
    Cheshire
    Posts
    13

    Exclamation Combining 'counta' and 'countif'

    Hi all,

    I'm trying to create a report to show daily statistics for internet traffic.

    I have a large table showing a daily breakdown of performance, a table showing combined cost for all "Mondays", "Tuesdays" etc in the month and I also want a table to show the "average" performance for a typical "Monday", "Tuesday" etc.

    The report will be used on a daily basis and I realised that until there is a full compliment of data the daily averages table would be inaccurate as it will be dividing the overall total for each day by the total number of occurances each day has in a typical month. This is wrong because if we are only halfway through the month then we will be dividing by days that haven't arrived yet.

    I thought about applying a "counta" function to the formula but this doesn't work so thought I'd post here for advice.

    The formula I have (without the counta) is:

    =(+SUMIF('Report Template'!$C$8:$C$38,"=Monday",'Report Template'!D$8:D$38))/(COUNTIF($C$8:$C$38,"Monday"))
    When I applied the "counta" I did so like this:

    =(+SUMIF('Report Template'!$C$8:$C$38,"=Monday",'Report Template'!D$8:D$38))/(COUNTA(COUNTIF($C$8:$C$38,"Monday")))
    What this formula does when the counta is applied is having the same effect as there being nothing after the "/" and it is just adding all of the "Monday" stats together.

    Would appreciate any help. I think this is beyond my capabilities!
    Last edited by oldchippy; 10-23-2008 at 04:00 PM.

  2. #2
    "Eagle Eyed" Forum Moderator oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Work) and 2007 (Home)
    Posts
    7,130
    Hi,

    Does this work for you?

    =SUMIF('Report Template'!$C$8:$C$38,"=Monday",'Report Template'!D$8:D$38)/SUMPRODUCT(--(C8:C38="Monday")*--(D8:D38>0))
    oldchippy
    -------------


    If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    10-01-2008
    Location
    Cheshire
    Posts
    13
    Quote Originally Posted by oldchippy View Post
    Hi,

    Does this work for you?

    =SUMIF('Report Template'!$C$8:$C$38,"=Monday",'Report Template'!D$8:D$38)/SUMPRODUCT(--(C8:C38="Monday")*--(D8:D38>0))
    Yes oldchippy - very helpful. Thanks a lot!

  4. #4
    "Eagle Eyed" Forum Moderator oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Work) and 2007 (Home)
    Posts
    7,130
    Glad to hear it - thanks for the feedback
    oldchippy
    -------------


    If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Another Countif or Sumproduct Question
    By Notanexpert in forum Excel General
    Replies: 6
    Last Post: 04-15-2008, 11:04 AM
  2. Counting even/odd rows with countif
    By Orlic in forum Excel Worksheet Functions
    Replies: 6
    Last Post: 12-10-2007, 12:07 AM
  3. Nested IF,COUNTA, and COUNTIF problem
    By Zcwilkins in forum Excel Worksheet Functions
    Replies: 6
    Last Post: 12-03-2007, 03:50 PM
  4. Countif Based Upon Text Length
    By tralls in forum Excel Worksheet Functions
    Replies: 5
    Last Post: 12-25-2006, 11:40 PM
  5. CountIF Help needed
    By kball in forum Excel - New Users
    Replies: 3
    Last Post: 11-04-2006, 02:40 PM

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.2.0