+ Reply to Thread
Results 1 to 3 of 3

Count cells in row based on cell values but only if the cell's column should be included

  1. #1
    Registered User
    Join Date
    03-23-2011
    Location
    West Bromwich, England
    MS-Off Ver
    Excel 2007 & 2013 in Azure
    Posts
    83

    Count cells in row based on cell values but only if the cell's column should be included

    Hi All,

    Is it possible to count cells in a row with multiple criteria, however the criteria is based on the cell values in the same row AND a single cell value for each column?

    The attached spreadsheet hopefully shows what I need. In summary, row 2 identifies whether the column should be included in the count and if "Yes", then for each row count the cells in the same row where the cell value = "Fail". To assist, I've manually input the expected results in column I and highlighted the cells green that should be counted.

    The data sets can have upto a hundred columns and a couple hundred thousand rows, which may impact the formula to be used due to prerformance.

    Can anybody help?

    Thanks in advance

    Tooley
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Count cells in row based on cell values but only if the cell's column should be includ

    Enter formula in I3 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or use COUNTIFS
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 05-25-2016 at 12:43 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count cells in row based on cell values but only if the cell's column should be includ

    Here's another one...

    =COUNTIFS(B$2:H$2,"Yes",B3:H3,"Fail")

    Copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Replies: 2
    Last Post: 03-20-2016, 04:54 AM
  2. Replies: 4
    Last Post: 07-10-2015, 06:43 PM
  3. [SOLVED] Copy and Paste Range of Cells based on # of cell values in Column A
    By bwaite87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 05:51 PM
  4. [SOLVED] Set cell equal to variable cell (from set column) based on cells in adjacent column
    By alter54 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2014, 01:04 PM
  5. [SOLVED] Urgent Help: Find if any of the two values is included in a range of cell
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2013, 09:49 AM
  6. Replies: 2
    Last Post: 12-01-2008, 05:10 PM
  7. count 1 cell in column based on value in another cell
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2005, 03: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