ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Writing Formulas (https://www.excelbanter.com/excel-worksheet-functions/8377-writing-formulas.html)

Irv

Writing Formulas
 
How do I write a formula that counts the number of cells in columns "A" & "B"
that has the letter "C" (in row "A") and "NC" (in row "B")?

For example: Column "A" has a series of C's (Customers) and V's (Vendors)
and column "B" has P (Paid) or NP (Not Paid).

N Harkawat

=sumproduct(--(a1:a5000="C"),--(b1:b5000)="NP")
will give the count of all customers and not paid combination

"Irv" wrote in message
...
How do I write a formula that counts the number of cells in columns "A" &
"B"
that has the letter "C" (in row "A") and "NC" (in row "B")?

For example: Column "A" has a series of C's (Customers) and V's (Vendors)
and column "B" has P (Paid) or NP (Not Paid).




Peo Sjoblom

One way

=SUMPRODUCT(--(A2:A200="C"),--(B2:B200="NC"))


Regards,

Peo Sjoblom

"Irv" wrote:

How do I write a formula that counts the number of cells in columns "A" & "B"
that has the letter "C" (in row "A") and "NC" (in row "B")?

For example: Column "A" has a series of C's (Customers) and V's (Vendors)
and column "B" has P (Paid) or NP (Not Paid).



All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com