+ Reply to Thread
Results 1 to 5 of 5

Counting if numbers fall within a specified range

  1. #1
    KG
    Guest

    Counting if numbers fall within a specified range

    For a range of cells containing percentages, how can I use COUNTIF to count
    those cells whose values fall between 90% and 110% ?

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    Assuming you want to exclude values that equal 90 and 110, try this:

    =COUNTIF(A1:A100,">90)-COUNTIF(A1:A100,">109")

    Change the range A1:A100 to suit your needs

  3. #3
    Dave Peterson
    Guest

    Re: Counting if numbers fall within a specified range

    You could count the number >= .9 and subtract the ones >1.10
    =countif(a1:a10,">=.9") - countif(a1:a10,">1.1")

    Or you could count the ones that are trapped between those numbers:
    =SUMPRODUCT(--(A1:A10>=0.9),--(A1:A10<1.1))

    =sumproduct() likes to work with numbers. The -- converts trues and falses to
    1's and 0's.





    KG wrote:
    >
    > For a range of cells containing percentages, how can I use COUNTIF to count
    > those cells whose values fall between 90% and 110% ?


    --

    Dave Peterson

  4. #4
    Alan
    Guest

    Re: Counting if numbers fall within a specified range

    One way,
    =SUMPRODUCT((A1:A100>=0.9)*(A1:A100<=1.1))
    Regards,
    Alan.
    "KG" <[email protected]> wrote in message
    news:[email protected]...
    > For a range of cells containing percentages, how can I use COUNTIF to
    > count
    > those cells whose values fall between 90% and 110% ?




  5. #5
    KG
    Guest

    Re: Counting if numbers fall within a specified range

    Thank you. I'll try both methods

    "Dave Peterson" wrote:

    > You could count the number >= .9 and subtract the ones >1.10
    > =countif(a1:a10,">=.9") - countif(a1:a10,">1.1")
    >
    > Or you could count the ones that are trapped between those numbers:
    > =SUMPRODUCT(--(A1:A10>=0.9),--(A1:A10<1.1))
    >
    > =sumproduct() likes to work with numbers. The -- converts trues and falses to
    > 1's and 0's.
    >
    >
    >
    >
    >
    > KG wrote:
    > >
    > > For a range of cells containing percentages, how can I use COUNTIF to count
    > > those cells whose values fall between 90% and 110% ?

    >
    > --
    >
    > Dave Peterson
    >


+ 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