+ Reply to Thread
Results 1 to 8 of 8

Count if greater than but less than

  1. #1
    Registered User
    Join Date
    01-09-2006
    Location
    Massachusetts
    MS-Off Ver
    Version 2402 Build 16.0.17328.20124)
    Posts
    60

    Count if greater than but less than

    I am trying to write a formula that states count if range of numbers is greater than 0 but less than 14. Can't seem to get the formula correct.
    Can someone help?
    Thanks
    Last edited by Janie; 02-25-2010 at 12:32 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 if greater than but less than

    Try

    =Countif(A1:A100,">0")-Countif(A1:A100,">=14")
    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
    Registered User
    Join Date
    01-09-2006
    Location
    Massachusetts
    MS-Off Ver
    Version 2402 Build 16.0.17328.20124)
    Posts
    60

    Re: Count if greater than but less than

    Thank you for your response. I tried the formula, but it seems it still is counting the cells with 0 in them. Any suggestions?

    Also, is there a way I can say if column B indicates "T" than count cells greater than zero but less than 14?
    Thanks for your help.

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

    Re: Count if greater than but less than

    Try:

    =Sumproduct(--(B1:B100="T"),--(A1:A100>0),--(A1:A100<14))

  5. #5
    Forum Contributor
    Join Date
    02-25-2010
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Count if greater than but less than

    Are you using Excel 2007?

    You can use the COUNTIFS() formula instead

    =COUNTIFS(range1, ">0", range1, "<=14")

    Edit: For accuracy
    Last edited by DP978; 02-25-2010 at 11:33 AM.

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

    Re: Count if greater than but less than

    Quote Originally Posted by DP978 View Post
    Are you using Excel 2007?

    You can use the COUNTIFS() formula instead

    =COUNTIFS(range1, ">0", range1, "<=14", count_range)
    You can also add your newest condition:

    =COUNTIFS(range1, ">0", range1, "<=14", range2, "T")

    there is not Count_range argument though

  7. #7
    Forum Contributor
    Join Date
    02-25-2010
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Count if greater than but less than

    Thanks NBVC, I have changed my above post to reflect the incorrect argument

  8. #8
    Registered User
    Join Date
    01-09-2006
    Location
    Massachusetts
    MS-Off Ver
    Version 2402 Build 16.0.17328.20124)
    Posts
    60

    Re: Count if greater than but less than

    Got it! Thanks

+ 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