+ Reply to Thread
Results 1 to 4 of 4

COUNT across multiple columns with single column criteria

  1. #1
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    COUNT across multiple columns with single column criteria

    Hi

    I'd like to count the number of times a specific entry appears across multiple columns using single column criteria.

    eg.

    Col1...Col2...Col3...Col4...Col5
    yes......a........b
    no........a.......b........c........d
    yes.......a.......b........c........d

    Let's say I want to count the number of time "a" appears but only when "yes" is in column 1. Normally I use COUNTIFS, but just found out that won't work unless both ranges are the same size. I could use multiple COUNTIFS, one for every column, but that becomes impractical as my columns grow in number. Is the only answer an array formula and if so could someone show me the correct syntax?

    many thanks

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,980

    Re: COUNT across multiple columns with single column criteria

    Try this:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    1
    yes a b
    2
    no a b c d
    3
    yes a b c d
    4
    5
    2
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    C
    5
    =SUMPRODUCT((A1:A3="yes")*(B1:E3="a"))
    Sheet: Sheet1
    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.

  3. #3
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: COUNT across multiple columns with single column criteria

    Brilliant, Thanks, Ali.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,980

    Re: COUNT across multiple columns with single column criteria

    No problem! Glad to have helped.

+ 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] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Domenic in forum Excel Formulas & Functions
    Replies: 36
    Last Post: 09-06-2005, 03:05 PM
  2. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Domenic in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] Sum Count of Single Criteria in Multiple Non-Adjacent columns
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-14-2005, 05:06 PM

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