View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Counting using OR?

One way:

=SUMPRODUCT(--ISNUMBER(FIND("Y",A1:A8&B1:B8)))


In article .com,
wrote:

I have 2 columns and want to get the count of each row where either
one of columns in that row is = "Y" and if both are = "Y", it still
only counts as one "Y". So, with the following (Row #s included at
left to avoid confusion)

Row Column A Column B
1 Y Y
2 Y
3 Y
4
5
6 Y
7 Y
8 Y

We should count 6 (rows 1, 2, 3, 6, 7, and 8 contain a "Y" in either
Column A or B)

NOTE: Rows with two "Y"s should only count once which is where I'm
having trouble using CountA

I'm really trying to avoid using any Macros or code other than built-
in functions if possible as some users will not have these activated
for security reasons.

Thanks!

-Aaron