ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding an AND Statement to COUNTIF (https://www.excelbanter.com/excel-worksheet-functions/31359-adding-statement-countif.html)

Kenton_SJ

Adding an AND Statement to COUNTIF
 
I want to count how many times a salesman's name comes up in a list. I would
like to be able to break it up by year, so the COUNTIF will filter through
the salesperson column and count the number of sales in any given year.

Date: Salesperson
01/01/2002 John
01/02/2002 John
01/02/2002 Cindy
01/01/2003 John
01/01/2003 Cindy

These are examples of my columns, I have about 7500 rows of data, from
around 5 years of sales. I can figure out how to filter with the serialized
date, and the COUNTIF will give me the total number of sales for each
Salesperson. I just can't seem to get them to work together. Any help here
would be greatly appreciated.

Thanks.

CLR

You might try doing your AutoFilter to get the series of data you want, then
copying it over to another sheet, and then doing a normal COUNTIF formula on
that new sheet.

If you have to do that a lot, it can be automated with macros to produce a
"report".........

Vaya con Dios,
Chuck, CABGx3



"Kenton_SJ" wrote in message
...
I want to count how many times a salesman's name comes up in a list. I

would
like to be able to break it up by year, so the COUNTIF will filter through
the salesperson column and count the number of sales in any given year.

Date: Salesperson
01/01/2002 John
01/02/2002 John
01/02/2002 Cindy
01/01/2003 John
01/01/2003 Cindy

These are examples of my columns, I have about 7500 rows of data, from
around 5 years of sales. I can figure out how to filter with the

serialized
date, and the COUNTIF will give me the total number of sales for each
Salesperson. I just can't seem to get them to work together. Any help

here
would be greatly appreciated.

Thanks.




Bob Phillips

You could just use a single formula

=SUMPRODUCT(--(YEAR(A2:A7500)=2002),--(B2:B7500="John"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kenton_SJ" wrote in message
...
I want to count how many times a salesman's name comes up in a list. I

would
like to be able to break it up by year, so the COUNTIF will filter through
the salesperson column and count the number of sales in any given year.

Date: Salesperson
01/01/2002 John
01/02/2002 John
01/02/2002 Cindy
01/01/2003 John
01/01/2003 Cindy

These are examples of my columns, I have about 7500 rows of data, from
around 5 years of sales. I can figure out how to filter with the

serialized
date, and the COUNTIF will give me the total number of sales for each
Salesperson. I just can't seem to get them to work together. Any help

here
would be greatly appreciated.

Thanks.





All times are GMT +1. The time now is 01:45 AM.

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