+ Reply to Thread
Results 1 to 8 of 8

Countif with multiple criteria

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Countif with multiple criteria

    Hi,

    I have the following formulas in a sheet called Reading.

    =COUNTIFS(ReadingGrade,Reading!$AZ6,ReadingVicCurrJ,"=0")

    =LEFT($C$2,1) = "0"

    In another sheet called calculations I would like to combine these two formulas. I would like it to check C2 to see if it contains 1. If it does I would like it to check the named range ReadingGrade to see if it matches AZ6. If it does I want it check the named range ReadingSemester1 and count all values that equal 0.

    I've tried different variations but haven't had any luck. I'm also not sure if it is an issue using a named range from a different sheet.

    Any help would be greatly appreciated.
    Last edited by Littlesimon; 02-10-2022 at 05:20 AM.

  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,830

    Re: Help with formula

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Help with formula

    While you are changing your thread title, please consider …

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Countif with multiple criteria

    Hi, in the attached file I have named ranges as listed below.

    B6:B156 = ReadingGrade

    AT6:AT156 = ReadingVicCurrJ

    C2 will include a number from 0-6 followed by two initials eg: 0TV, 4RF, 6ST or just the number on it's own.

    AZ6 shows the first grade listed within ReadingGrade.


    I would like to check if C2 contains 0. If it does count all the instances where AZ6 is listed in Reading Grade as well as equal to 0 in ReadingVicCurrJ.

    I would like this formula to sit in the calculations sheet. I hope that makes sense.

    Any help would be greatly appreciated.
    Attached Files Attached Files

  5. #5
    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,830

    Re: Countif with multiple criteria

    @Littlesimon

    Your thread title needs to be changed in the OPENING POST to the thread. Please do this now.

    No help until this has been done. Thanks.

  6. #6
    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,830

    Re: Countif with multiple criteria

    Thank you.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Countif with multiple criteria

    Try

    =IF(LEFT(Reading!$C$2,1) = "0",COUNTIFS(ReadingGrade,Reading!$AZ6,ReadingVicCurrJ,0),"")
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Re: Countif with multiple criteria

    Thank you John, that worked perfectly. I had the very last part wrong. I might need a few variations where the 0 is at the end. How would I alter it by changing the 0 to

    = 0.5 or D

    = F or D or <=0.5

    = F.5 or F or D or<=0.5

    Thanks again
    Last edited by Littlesimon; 02-11-2022 at 07:26 PM.

+ 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: 03-24-2020, 07:27 AM
  2. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  3. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  4. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  5. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

Tags for this Thread

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