+ Reply to Thread
Results 1 to 3 of 3

Count with 2 conditions, second one OR

  1. #1

    Count with 2 conditions, second one OR

    I need to count occurrences within the same column of having both "A"
    and (either 0 or 5). [Actually, I'm using the zero or 5 because what I
    really want to do is count if there is both an "A" and any number, but
    the zero or 5 will work within my set of numbers.]

    Thank you--I've read many great responses Joann


  2. #2
    Bob Phillips
    Guest

    Re: Count with 2 conditions, second one OR

    how can it be A and 0 (or) in the same column. If you mean different columns

    =SUMPRODUCT(--(A1:A100="A"),--(ISNUMBER(MATCH(B1:B100,{0,5},0))))

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    <[email protected]> wrote in message
    news:[email protected]...
    > I need to count occurrences within the same column of having both "A"
    > and (either 0 or 5). [Actually, I'm using the zero or 5 because what I
    > really want to do is count if there is both an "A" and any number, but
    > the zero or 5 will work within my set of numbers.]
    >
    > Thank you--I've read many great responses Joann
    >




  3. #3
    Ron Coderre
    Guest

    RE: Count with 2 conditions, second one OR

    Do your values start with a letter and end with, or contain, a number?
    something like this?:
    C2 or A5 or A7...etc ,
    or C123 or A050...etc

    If YES, maybe something like one of these:

    For values in A1:A100

    This formula counts cells containing A0 or A5:
    B1: =SUMPRODUCT(COUNTIF(A1:A100,{"A0","A5"}))

    or

    This formula counts cells that begin with A and contain a zero or a 5:
    B1: =SUMPRODUCT(COUNTIF(A1:A25,{"A*0*","A*5*"}))
    (So it would count values like: Abc5, A120, and A302)

    Does that help?
    ***********
    Regards,
    Ron

    XL2002, WinXP


    "[email protected]" wrote:

    > I need to count occurrences within the same column of having both "A"
    > and (either 0 or 5). [Actually, I'm using the zero or 5 because what I
    > really want to do is count if there is both an "A" and any number, but
    > the zero or 5 will work within my set of numbers.]
    >
    > Thank you--I've read many great responses Joann
    >
    >


+ 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