+ Reply to Thread
Results 1 to 5 of 5

Simple question, Countif/Sumif

Hybrid View

  1. #1
    Registered User
    Join Date
    01-06-2017
    Location
    USA
    MS-Off Ver
    Microsoft Office Professional 2013
    Posts
    2

    Simple question, Countif/Sumif

    Good morning all,

    I hope it is alright that I start with a basic question.

    I am working with the CountIfS(....) and Sumif() formulas.

    Do you know if there is a way to count using some type of 'Or' within the formula? For example, I am using countif based on keywords. Is there a way to count for two different key words, =COUNTIFS(Table1!B:B,"*Red*") or.... blue....

    I hope I explained this thoroughly enough. I need it to truly sum on more than one keyword, but not an 'and' function.

    Thank you all!

  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: Simple question, Countif/Sumif

    Yes, you just need to ADD two COUNTIFS()/SUMIFS(). As you rightly identify a single COUNTIF() is esentially and AND condition. So just use

    =COUNTIFS(Table1!B:B,"Red")+COUNTIFS(Table1!B:B,"Blue")

    Alternatively and assuming the underlying data is in a normalised 2 dimensional table then use a Pivot Table.
    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
    Registered User
    Join Date
    01-06-2017
    Location
    USA
    MS-Off Ver
    Microsoft Office Professional 2013
    Posts
    2

    Re: Simple question, Countif/Sumif

    Thank you Richard!

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

    Re: Simple question, Countif/Sumif

    One way...

    =SUM(COUNTIF(Table1!B:B,{"Red","Blue"}))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    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: Simple question, Countif/Sumif

    Quote Originally Posted by Tony Valko View Post
    One way...

    =SUM(COUNTIF(Table1!B:B,{"Red","Blue"}))
    ...even better

+ 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] Simple SUMIF Question
    By Steve0492 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2013, 04:16 AM
  2. Simple Sumif question.
    By kxlxl in forum Excel General
    Replies: 1
    Last Post: 10-31-2006, 02:03 PM
  3. this may be simple, sumif question
    By Sandy Mann in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 PM
  4. this may be simple, sumif question
    By Sandy Mann in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-06-2005, 05:05 PM
  5. this may be simple, sumif question
    By jim sturtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  6. [SOLVED] this may be simple, sumif question
    By jim sturtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  7. [SOLVED] this may be simple, sumif question
    By jim sturtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  8. this may be simple, sumif question
    By jim sturtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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