+ Reply to Thread
Results 1 to 3 of 3

Counting numbers that are in between two values

  1. #1
    Forum Contributor
    Join Date
    12-07-2004
    Posts
    596

    Counting numbers that are in between two values

    Problem:

    Finding the number of values in List1 (Column A) that are larger than 20 and smaller than 50.

    Solution:

    Using the following COUNTIF formula:
    =COUNTIF(A2:A7,\"\">20\"\")-COUNTIF(A2:A7,\"\">=50\"\")
    Or this SUMPRODUCT formula:
    =SUMPRODUCT((A2:A7>20)*(A2:A7

    List1
    30
    10
    60
    40
    15
    55

    Result 2


  2. #2
    Registered User
    Join Date
    11-13-2003
    Location
    USA
    Posts
    20
    how would this formula change if you need to compare more than two things?

  3. #3
    Registered User
    Join Date
    08-14-2003
    Location
    New Zealand
    Posts
    41

    Reply: alizok

    Hi alizok,

    Quote Originally Posted by alizok
    how would this formula change if you need to compare more than two things?
    Personally, I wouldn't use that approach.

    I would suggest using a sum array formula to make it easier to understand and make it more scaleable across multiple criteria.

    See this post for an example (2 criteria but obvious how to extend):

    http://www.excelforum.com/showthread...=1#post1360137

    HTH,

    Alan.
    Last edited by Alan; 10-11-2005 at 06:43 AM.
    To help us help you, try to do the following:

    1) Be precise about what you want to do, and provide a sample of your data / inputs - exactly as they are.

    2) State the formula(e) / code that you have tried. People are happy to help , but if you haven't even given it a go, you are less likely to get help, or the help you get will be very basic.

    3) State the results you are getting from your formula(e) / code already.

    4) State the outputs that you *want* to be getting.

+ 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