+ Reply to Thread
Results 1 to 7 of 7

count the number of cells in a range that are greater than 36 & less than 48

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    count the number of cells in a range that are greater than 36 & less than 48

    Hi,

    I'm trying to calculate the number of cells in a range that are greater or equal than 36 but less than or equal to 48.

    Here's what I have:

    =COUNTIF(J2:J312,">36,<48")

    It keeps returning a value of 0.

    Can someone please help.

    Thx.
    Last edited by mbhim; 02-24-2012 at 01:17 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count the number of cells in a range that are greater than 36 & less than 48

    Try:

    =COUNTIFS(J2:J312,">=36",J2:J312,"<=48")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: count the number of cells in a range that are greater than 36 & less than 48

    mbhim,

    Welcome to the forum!
    I see you have Excel 2007 listed as your MS Office version. In that case, you can use CountIfs:
    =COUNTIFS(J2:J312,">=36",J2:J312,"<=48")
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-24-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: count the number of cells in a range that are greater than 36 & less than 48

    Thank you! That worked.... I do have another question though. I now have to add another condition - calculate the number of cells in a range that are greater or equal than 36 but less than or equal to 48, and that answer "yes" in another column.

    ie.

    Age Yes/No
    59 No
    36 Yes
    59 No
    59 No
    52 Yes
    59 No
    13 Yes
    58 No
    48 Yes
    57 No
    37 Yes
    57 No
    41 Yes
    57 No
    37 No
    57 No
    57 No
    57 No

    Any ideas?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: count the number of cells in a range that are greater than 36 & less than 48

    COUNTIFS allows multiple conditions so with Yes/No in column K you can change the prviously suggested formula as follows

    =COUNTIFS(J2:J312,">=36",J2:J312,"<=48",K2:K312,"Yes")
    Audere est facere

  6. #6
    Registered User
    Join Date
    02-24-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: count the number of cells in a range that are greater than 36 & less than 48

    That worked! Thank you so much!! You've saved me so much time!!!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count the number of cells in a range that are greater than 36 & less than 48

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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