+ Reply to Thread
Results 1 to 4 of 4

COUNTIF for range of numbers

  1. #1
    bimseun
    Guest

    COUNTIF for range of numbers

    I hav got the following numbers:
    A
    45
    54
    12
    32
    55
    78
    65
    45
    I want to use the count how many of this is within the ranges
    0-40
    41-80
    Please can someone advice on how to wtrite the function.
    bimseun
    11-20


  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If your numbers are all greater than or equal to zero and in range A1:A10

    =COUNTIF(A1:A10,"<=40")

    If the above formula is in B1 then for 41-80

    =COUNTIF(A1:A10,"<=80")-B1

  3. #3
    JE McGimpsey
    Guest

    Re: COUNTIF for range of numbers

    One way:

    0-40:

    =COUNTIF(A:A,"<=40") - COUNTIF(A:A, "<0")

    41-80:

    =COUNTIF(A:A,"<=80") - COUNTIF(A:A, "<=40")

    Alternatively:

    0-40:

    =SUMPRODUCT(--(A1:A100<=40),--(A1:A100>=0))

    41-80:

    =SUMPRODUCT(--(A1:A100<=80),--(A1:A100>40))


    In article <[email protected]>,
    "bimseun" <[email protected]> wrote:

    > I hav got the following numbers:
    > A
    > 45
    > 54
    > 12
    > 32
    > 55
    > 78
    > 65
    > 45
    > I want to use the count how many of this is within the ranges
    > 0-40
    > 41-80
    > Please can someone advice on how to wtrite the function.
    > bimseun
    > 11-20


  4. #4
    Ron Rosenfeld
    Guest

    Re: COUNTIF for range of numbers

    On Tue, 24 Jan 2006 06:13:02 -0800, "bimseun"
    <[email protected]> wrote:

    >I hav got the following numbers:
    >A
    >45
    >54
    >12
    >32
    >55
    >78
    >65
    >45
    >I want to use the count how many of this is within the ranges
    >0-40
    >41-80
    >Please can someone advice on how to wtrite the function.
    >bimseun
    >11-20



    =COUNTIF(rng,">=0") - COUNTIF(rng,">40")

    However, depending on your application, you might be better served using the
    FREQUENCY worksheet function.
    --ron

+ 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