+ Reply to Thread
Results 1 to 6 of 6

Count, counta & countif

  1. #1
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    24

    Count, counta & countif

    Hello everyone,

    I seem to have trouble with a formula.

    Here is an example of what i'm using to generate my list of averages (for blue only, table1) :

    =IFERROR(AVERAGE(IF((Table1[Municipality]=B4)*(Table1[Street]=C4)*(Table1[[04-Jun-17]:[30-Jul-17]]<>""),Table1[[04-Jun-17]:[30-Jul-17]])),"")

    Now, that formula works great for average, but i seem to be getting wrongs values when i want to count all the non-blank spaces, the spaces only with a "b" value and the ones with a "nb" value.

    Here is what ma tables of results looks like:
    STREETAVERAGE.PNG

    And here is the table from witch I'm extracting information (Table1)
    TABLE1111.PNG

    Now i would like a Formula like in the first Picture, that i could drag down that would count all the "non empty spaces" under samples>blue , then count all the "nb" under nb>blue, and finally the "b" .

    I've tried something like this but it count my entire blue Table1..

    =IFERROR(COUNTA(IF((Table1[Municipality]=B4)*(Table1[Street]=C4)*(Table1[[04-Jun-17]:[30-Jul-17]]<>""),Table1[[04-Jun-17]:[30-Jul-17]])),"")

    Thanks for your time

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Count, counta & countif

    Hi,

    Perhaps
    =IFERROR(SUM((Table1[Municipality]=B4)*(Table1[Street]=C4)*(Table1[[04-Jun-17]:[30-Jul-17]]<>"")),"")
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    24

    Re: Count, counta & countif

    That seems to work to count my non blank cells, thanks!!

    Now is there a way to specify the formula to only count cells with "nb" ?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,573

    Re: Count, counta & countif

    Try this:

    =IFERROR(SUM((Table1[Municipality]=B4)*(Table1[Street]=C4)*(Table1[[04-Jun-17]:[30-Jul-17]]="nb")),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    24

    Re: Count, counta & countif

    Thank you AliGW, It seems i should of been using the SUM instead of COUNT.

    TY again, this Forum is very helpful.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,573

    Re: Count, counta & countif

    You're welcome!

+ 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. [SOLVED] COUNTA or COUNTIF to count cells -mix of numbers and alphanumerics
    By b.. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2015, 11:39 AM
  2. [SOLVED] Countif / Counta
    By joshag in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-22-2015, 10:44 AM
  3. Excel 2007 : CountIF or CountA
    By bjohnsonac in forum Excel General
    Replies: 3
    Last Post: 01-24-2011, 12:46 PM
  4. Countif, Count, Offset, Counta and Charts
    By riyo91 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-29-2010, 06:46 AM
  5. [SOLVED] Errors in COUNT, COUNTA, COUNTIF when counting merged cells
    By Outback in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2006, 12:35 PM
  6. [SOLVED] CountIF, CountA,Which one? or neither?
    By amy in forum Excel General
    Replies: 2
    Last Post: 07-20-2005, 04:05 PM
  7. COUNTA, COUNTIF?
    By Newbie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2005, 08:06 AM

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