Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default 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)

wrote in message
oups.com...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default 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


" 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Count using 2 conditions, one of which being a "less than or equal to" - URGENT SamGB Excel Discussion (Misc queries) 2 February 15th 06 10:35 AM
COUNT using multiple conditions SamGB Excel Discussion (Misc queries) 2 February 9th 06 10:12 PM
Count the number of Cells in one ROW with conditions Amanda Excel Worksheet Functions 2 September 9th 05 04:03 PM
How do I count number of cels the matches 2 conditions ? Abra Excel Worksheet Functions 2 February 27th 05 08:56 PM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"