+ Reply to Thread
Results 1 to 12 of 12

COUNTIFS function

  1. #1
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    COUNTIFS function

    I am doing a spreadsheet project for school and I cannot get the following to work: I am counting columns of numbers that represent grades for four different classes. I need to use the COUNTIFS function to count the number of students from another worksheet (data) that will get an A, B, C, etc. based on their number grade, i.e. <90 = A. So for that formula I am using:

    =COUNTIF(data!B2:E119,">90") and getting the correct response (I think.)

    This is the formula I am using for the grade ranges:

    =COUNTIFS(data!B3:E119,"<80",data!B3:E119,">=70")

    I should end up with 626 total students, but the counts add up to 521 instead. What am I missing?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: COUNTIFS function

    Hello and Welcome to the Board,

    On the surface nothing looks wrong with your formula.

    Do you have a sample set of data without any personal data you can attach?

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: COUNTIFS function

    Do you have any text in the range you are trying to count?

  4. #4
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Quote Originally Posted by jeffreybrown View Post
    Hello and Welcome to the Board,

    On the surface nothing looks wrong with your formula.

    Do you have a sample set of data without any personal data you can attach?
    Sorry. I took a break. OK. It is called teaching.xslx
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Quote Originally Posted by MarvinP View Post
    Do you have any text in the range you are trying to count?
    No. It is all numbers between 0 and 110.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: COUNTIFS function

    From your data you need to go down to E239 to pick up all the scores.

    I think that is the problem.

  7. #7
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Quote Originally Posted by MarvinP View Post
    From your data you need to go down to E239 to pick up all the scores.

    I think that is the problem.
    Wow! Thanks! You are probably right, but why? Doesn't the data end in E119?

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: COUNTIFS function

    Quote Originally Posted by RM Rilke
    Doesn't the data end in E119?
    It does in Column E but you have more student results in the other columns (see C239) - you must include these other rows in your range hence B3:E239

  9. #9
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Quote Originally Posted by DonkeyOte View Post
    It does in Column E but you have more student results in the other columns (see C239) - you must include these other rows in your range hence B3:E239
    Thank you so much. My count is much closer, but it is still off by 8. Is my formula missing the zeros? I think there are eight of them. Do I need to add a third criteria to my COUNTIF formula?

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: COUNTIFS function

    Quote Originally Posted by RM Rilke View Post
    Thank you so much. My count is much closer, but it is still off by 8. Is my formula missing the zeros? I think there are eight of them. Do I need to add a third criteria to my COUNTIF formula?
    If you can provide what formula you are using I would be glad to help.

    Are you still looking at the same range and what should your result be?

  11. #11
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Quote Originally Posted by jeffreybrown View Post
    If you can provide what formula you are using I would be glad to help.

    Are you still looking at the same range and what should your result be?
    I'm still looking at the same range. The workbook is attached. On the Counts sheet you can see the formulas for each grade, i.e. 90 and above is an "A" 80-89 is a "B", etc.

    This is the COUNTIFS formula to find all of the students who will get a "B":

    =COUNTIFS(Data!B3:E239,"<90",Data!B3:E239,">=80")

  12. #12
    Registered User
    Join Date
    09-29-2010
    Location
    Sedona, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: COUNTIFS function

    Never mind. My count was off by eight, not the formulas! Thanks anyway for offering to help!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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