+ Reply to Thread
Results 1 to 4 of 4

Countif help

  1. #1
    Registered User
    Join Date
    07-09-2015
    Location
    Scotland
    MS-Off Ver
    2013
    Posts
    1

    Countif help

    Hi!
    I’m quite an excel noob and need some help with two things!

    I’m doing a survey as part of my MSc thesis and I’ve created a spreadsheet that pulls together all the important information.
    I know these are very simple problems (I just can’t seem to get anywhere – takes me back to my days of using R!)

    Problem 1;
    I’m trying to compare public opinion of water quality to the actual water quality, so I want to write a condition that counts when the text within two cells is the same.

    Problem 2;
    I’m trying to look at water user perceptions, which is comprised of three categories and break up these results further. I’ve tried using the COUNTIF function with no use.

    =COUNTIFS(Responses!$G$2:$G$300,"Kayak", Responses!$G$2:$G$300,"Swim", ", Responses!$G$2:$G$300,"Watersports”, Responses!$C$2:$C$300,"Male")

    That was my useless attempt. I can see why it doesn’t work (probably need to use an OR in there or something?), but thought it might help to show what I’m trying to do?

    - Count all the rows that are either Swim, Kayak or Watersports that are Male.

    Apologies if this is cryptic and difficult to understand – Seeing double after a 12 hour shift in the lab and now trying to get this sorted .

    Any help would be greatly appreciated!

    Cheers,
    Ross

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Countif help

    I *think* this is what you're trying to achieve...

    This formula returns the count of Col_G items containing Swim, Kayak, or Watersports where the corresponding Col_C value is Male
    Please Login or Register  to view this content.
    The inner section (COUNTIFS) returns an array of 3 values pertaining to the Swim, Kayak, or Watersports categories. The SUM function totals those values.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countif help

    Countifs (and sumifs and averageifs) treats the criteria as AND, not OR.
    So it will only count a row if ALL 4 criteria are met.
    And no cell in column G can be Kayak AND Swim AND Watersports.

    To do that as an or, try like this

    =SUM(COUNTIFS(Responses!$G$2:$G$300,{"Kayak","Swim","Watersports"}, Responses!$C$2:$C$300,"Male"))

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Countif help

    Welcome to the board.

    =SUM(COUNTIFS(Responses!$C$2:$C$300, "Male", Responses!$G$2:$G$300, {"Kayak","Swim","Watersports"}))
    Entia non sunt multiplicanda sine necessitate

+ 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] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  2. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  3. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  4. [SOLVED] COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  5. Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 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