+ Reply to Thread
Results 1 to 4 of 4

Function countif with conditions

  1. #1
    Gordon
    Guest

    Function countif with conditions

    I have a list of numbers (2000 lines). I need to count the numbers of
    the values in different ranges. eg <= $10.00, $10.01 to $100.00,
    $100.01 to $500.00, etc.

    The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

    But for the next range, formula
    =COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.

    What's the problem? How can I get this to work?


    TIA


  2. #2
    aka excel
    Guest

    RE: Function countif with conditions

    Try the formula =COUNTIF(H2:H2001,">=10")-COUNTIF(B2:B5,">100")


    "Gordon" wrote:

    > I have a list of numbers (2000 lines). I need to count the numbers of
    > the values in different ranges. eg <= $10.00, $10.01 to $100.00,
    > $100.01 to $500.00, etc.
    >
    > The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.
    >
    > But for the next range, formula
    > =COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.
    >
    > What's the problem? How can I get this to work?
    >
    >
    > TIA
    >
    >


  3. #3
    David Billigmeier
    Guest

    RE: Function countif with conditions

    =SUMPRODUCT((H2:H2001>10)*(H2:H2001<=100))

    --
    Regards,
    Dave
    <!--


    "Gordon" wrote:

    > I have a list of numbers (2000 lines). I need to count the numbers of
    > the values in different ranges. eg <= $10.00, $10.01 to $100.00,
    > $100.01 to $500.00, etc.
    >
    > The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.
    >
    > But for the next range, formula
    > =COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.
    >
    > What's the problem? How can I get this to work?
    >
    >
    > TIA
    >
    >


  4. #4
    kk
    Guest

    Re: Function countif with conditions

    Hi Gordon,

    You can try...

    =SUMPRODUCT(--(H2:H2001>10),--(H2:H2001<=100))




    "Gordon" <[email protected]> wrote in message
    news:[email protected]...
    I have a list of numbers (2000 lines). I need to count the numbers of
    the values in different ranges. eg <= $10.00, $10.01 to $100.00,
    $100.01 to $500.00, etc.

    The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

    But for the next range, formula
    =COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.

    What's the problem? How can I get this to work?


    TIA



+ 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