+ Reply to Thread
Results 1 to 5 of 5

=COUNTIFS and Multi-Column Exceptions

  1. #1
    Registered User
    Join Date
    05-06-2013
    Location
    Los Angeles
    MS-Off Ver
    Google Sheets, Excel 2016 For Mac
    Posts
    9

    =COUNTIFS and Multi-Column Exceptions

    I have the following formula in a cell:

    =COUNTIFS(B:B,"Fred",F:F,"Green")

    This produces a count of how many green apples belong to Fred. Now let's say column C contains info about where the apples were purchased ("Store", "Farm", "Market", etc.), and I'd like to count all the green apples that belong to Fred (current formula) PLUS all the red apples that belong to Fred that came from the Market, but not from the Store or Farm.

    Anyone have any ideas about how to modify the COUNTIFS formula above?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: =COUNTIFS and Multi-Column Exceptions

    Hi,

    Presumably

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  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: =COUNTIFS and Multi-Column Exceptions

    I think you'll need to combine 2 COUNTIFS like this...

    =COUNTIFS(B:B,"Fred",F:F,"Green")+COUNTIFS(B:B,"Fred",F:F,"Red",C:C,"Market")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-06-2013
    Location
    Los Angeles
    MS-Off Ver
    Google Sheets, Excel 2016 For Mac
    Posts
    9

    Re: =COUNTIFS and Multi-Column Exceptions

    Ah, that worked; thank you both! I was mentally heading toward something unnecessarily complex like "Green" unless "Market" then "Red" and "Green"...

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

    Re: =COUNTIFS and Multi-Column Exceptions

    You're welcome. Thanks for the feedback!

+ 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: 3
    Last Post: 09-29-2015, 08:27 PM
  2. [SOLVED] Conditional Formatting Exceptions Based on Another Column
    By dtrimble in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-15-2015, 06:09 AM
  3. Complicated multi workbook countifs help
    By IronCladRooster in forum Excel General
    Replies: 1
    Last Post: 01-07-2015, 05:55 PM
  4. Replies: 19
    Last Post: 10-05-2012, 01:03 PM
  5. Multi-Column Listboxes correspond to multi textboxes
    By Crebsington in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2012, 01:38 PM
  6. Text to Column with Exceptions
    By willowonyx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2010, 12:55 PM
  7. Replies: 6
    Last Post: 02-21-2009, 08:13 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