Results 1 to 3 of 3

COUNTIF combined with AND

This is a discussion on COUNTIF combined with AND within the Excel Questions forums, part of the Question Forums category; I'm wondering if it is possible to combine the COUNTIF formula with and AND. For example, in two columns of ...

  1. #1
    New Member
    Join Date
    Jun 2003
    Location
    St. Louis, MO
    Posts
    37

    Default COUNTIF combined with AND

    I'm wondering if it is possible to combine the COUNTIF formula with and AND.

    For example, in two columns of data the first column contains one of 8 possible entries. Column two contains one of 4 possible entries (both regulated by a validation list).

    I am trying to count the number of times one entry occurs in the first column in conjunction with an entry in the second column, for a total of 32 possible combinations.

    The result need only be the number of occurences (as I will be further manipulating the data).

    Following is an non-working example of the present formula:

    =COUNTIF(AND('PENDING SHIPMENTS'!E2:E145,"100-1",'PENDING SHIPMENTS'!G2:G145,"RAW"))

    Thank you in advance.

  2. #2
    Legend just_jon's Avatar
    Join Date
    Sep 2002
    Location
    Alabama/State of Disarray
    Posts
    10,473

    Default Re: COUNTIF combined with AND

    Try --

    =SUMPRODUCT(('PENDING SHIPMENTS'!$E$2:$E$145="100-1")*('PENDING SHIPMENTS'!$G$2:$G$145="RAW"))
    just_jon
    Book of the Month: I'm Not Really an MVP, I Just Play One on TV [j. jon, 2004]

  3. #3
    New Member
    Join Date
    Jun 2003
    Location
    St. Louis, MO
    Posts
    37

    Default Re: COUNTIF combined with AND

    Thank you very much...I had a feeling I was making use of the wrong function. Yours works great!

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com