+ Reply to Thread
Results 1 to 4 of 4

COUNTIF() With multiple ranges and variables

  1. #1
    Thansal
    Guest

    COUNTIF() With multiple ranges and variables

    The function I am looking for is something that will simply look at 2
    ranges (euqaly large) and only count them if they meet 2 criteria on
    the same row

    EX:

    A B
    1 1
    1 2
    1 3
    2 1
    2 2
    2 3

    So what I am sorta looking for is something that would count the
    instances where A = 1 and B > 1.

    I can't figgure out a propper function for this.

    Any help would be appreciated.

    AlexV


  2. #2
    Ardus Petus
    Guest

    Re: COUNTIF() With multiple ranges and variables

    =SUMPRODUCT((A1:A1000=1)*(B1:B1000>1))

    HTH
    --
    AP

    "Thansal" <[email protected]> a écrit dans le message de news:
    [email protected]...
    > The function I am looking for is something that will simply look at 2
    > ranges (euqaly large) and only count them if they meet 2 criteria on
    > the same row
    >
    > EX:
    >
    > A B
    > 1 1
    > 1 2
    > 1 3
    > 2 1
    > 2 2
    > 2 3
    >
    > So what I am sorta looking for is something that would count the
    > instances where A = 1 and B > 1.
    >
    > I can't figgure out a propper function for this.
    >
    > Any help would be appreciated.
    >
    > AlexV
    >




  3. #3
    Sloth
    Guest

    RE: COUNTIF() With multiple ranges and variables

    =SUMPRODUCT(--(A1:A6=1),--(B1:B6>1))

    "Thansal" wrote:

    > The function I am looking for is something that will simply look at 2
    > ranges (euqaly large) and only count them if they meet 2 criteria on
    > the same row
    >
    > EX:
    >
    > A B
    > 1 1
    > 1 2
    > 1 3
    > 2 1
    > 2 2
    > 2 3
    >
    > So what I am sorta looking for is something that would count the
    > instances where A = 1 and B > 1.
    >
    > I can't figgure out a propper function for this.
    >
    > Any help would be appreciated.
    >
    > AlexV
    >
    >


  4. #4
    Thansal
    Guest

    Re: COUNTIF() With multiple ranges and variables

    Thank you all.

    It took me a long time, but that was b/c I had an error in my data that
    I had not caught.
    Sloth wrote:
    > =SUMPRODUCT(--(A1:A6=1),--(B1:B6>1))
    >
    > "Thansal" wrote:
    >
    > > The function I am looking for is something that will simply look at 2
    > > ranges (euqaly large) and only count them if they meet 2 criteria on
    > > the same row
    > >
    > > EX:
    > >
    > > A B
    > > 1 1
    > > 1 2
    > > 1 3
    > > 2 1
    > > 2 2
    > > 2 3
    > >
    > > So what I am sorta looking for is something that would count the
    > > instances where A = 1 and B > 1.
    > >
    > > I can't figgure out a propper function for this.
    > >
    > > Any help would be appreciated.
    > >
    > > AlexV
    > >
    > >



+ 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