ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   CountIf question (https://www.excelbanter.com/excel-worksheet-functions/234642-countif-question.html)

Stuck

CountIf question
 
I'm having an issue adding additional criteria to my formula. Here is my
current formula:

=COUNTIF(OFFSET($P$9,0,0,(COUNTA($A:$A))-2,1),$P3)

Column A has number identifiers. Column P has a formula in it that
generates a letter. If the letter matches P3 then the cell is counted. I
would like to add Column C to my formula above. If Column C contains "x" and
column P matches P3, then count column A. Please keep in mind that P
contains a fomula, so text and numbers is not recognized....(I think)

Jacob Skaria

CountIf question
 
Try

=SUMPRODUCT(--(C1:C1000="x"),--(P1:P1000=P3))

If this post helps click Yes
---------------
Jacob Skaria


"Stuck" wrote:

I'm having an issue adding additional criteria to my formula. Here is my
current formula:

=COUNTIF(OFFSET($P$9,0,0,(COUNTA($A:$A))-2,1),$P3)

Column A has number identifiers. Column P has a formula in it that
generates a letter. If the letter matches P3 then the cell is counted. I
would like to add Column C to my formula above. If Column C contains "x" and
column P matches P3, then count column A. Please keep in mind that P
contains a fomula, so text and numbers is not recognized....(I think)


T. Valko

CountIf question
 
If I understand what you want then create these named ranges:

InsertNameDefine
Name: ColA
Refers to:

=OFFSET($A$9,,,COUNTA($A:$A)-2)

Name: ColC
Refers to:

=OFFSET($C$9,,,COUNTA($A:$A)-2)

Name: ColP
Refers to:

=OFFSET($P$9,,,COUNTA($A:$A)-2)

Then:

=SUMPRODUCT(--(ISNUMBER(ColA)),--(ColC="x"),--(ColP=P3))


--
Biff
Microsoft Excel MVP


"Stuck" wrote in message
...
I'm having an issue adding additional criteria to my formula. Here is my
current formula:

=COUNTIF(OFFSET($P$9,0,0,(COUNTA($A:$A))-2,1),$P3)

Column A has number identifiers. Column P has a formula in it that
generates a letter. If the letter matches P3 then the cell is counted. I
would like to add Column C to my formula above. If Column C contains "x"
and
column P matches P3, then count column A. Please keep in mind that P
contains a fomula, so text and numbers is not recognized....(I think)





All times are GMT +1. The time now is 02:37 PM.

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