function for counting cells in combinations

  • Thread starter Thread starter jefe
  • Start date Start date
J

jefe

I have a sheet that has three columns.
I want to count the number of cells in column a that
contain "Y" or "NA" if that same row has a "Y" in column C.

Similarly, I want to count the "Y"s in column B that also
have a "Y" in column C.

From time to time, I see that VBA codes are given as
solutions for other inquiries. If this is necessary for
this problem, where do I insert this code?

Thanks
 
Hi
no need for VBA. Try the following formula
=SUMPRODUCT(((A1:A1000="Y")+(A1:A1000="NA")>0)*(C1:C1000="Y"))
for your first question. For the second one use
=SUMPRODUCT((B1:B1000="Y")*(C1:C1000="Y"))
 
Works great - thanks.

God bless
-----Original Message-----
Hi
no need for VBA. Try the following formula
=SUMPRODUCT(((A1:A1000="Y")+(A1:A1000="NA")>0)* (C1:C1000="Y"))
for your first question. For the second one use
=SUMPRODUCT((B1:B1000="Y")*(C1:C1000="Y"))

--
Regards
Frank Kabel
Frankfurt, Germany

.
 
Back
Top