ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNT IF (https://www.excelbanter.com/excel-worksheet-functions/65641-count-if.html)

SkyGanz

COUNT IF
 
I am trying to "count if" across two columns. i.e Column A has categories:
direct mail, ads, tradeshows; and column B has months: January, Feb, Mar.
etc. I need the formula that will show me a count of all "direct mail" in
"January". I can't get the "countif" formula to do it, and a pivot table is
not working either. Any suggestions? Any formulas to try

Roger Govier

COUNT IF
 
Hi

I would put the category require form column A in say cell C1, and the
month required in B1.
Assuming your dates are Text e.g. "Jan", "Feb" etc. then
=SUMPRODUCT(--($A$1:$A$100=C1),--($B$1:$B$100=D1))
If the dates are Excel dates, e.g. 01/01/2006, but formatted to show
Jan, Feb etc., then with an Excel date in D1
=SUMPRODUCT(--($A$1:$A$100=C1),--(MONTH($B$1:$B$100)=MONTH(D1)))
--
Regards

Roger Govier


"SkyGanz" wrote in message
...
I am trying to "count if" across two columns. i.e Column A has
categories:
direct mail, ads, tradeshows; and column B has months: January, Feb,
Mar.
etc. I need the formula that will show me a count of all "direct
mail" in
"January". I can't get the "countif" formula to do it, and a pivot
table is
not working either. Any suggestions? Any formulas to try





COUNT IF
 
Hi

Try something like this:
=SUMPRODUCT((A2:A1000="direct mail")*(B2:B1000="January"))

Hope this helps.
Andy.

"SkyGanz" wrote in message
...
I am trying to "count if" across two columns. i.e Column A has categories:
direct mail, ads, tradeshows; and column B has months: January, Feb, Mar.
etc. I need the formula that will show me a count of all "direct mail" in
"January". I can't get the "countif" formula to do it, and a pivot table
is
not working either. Any suggestions? Any formulas to try





All times are GMT +1. The time now is 05:16 AM.

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