Adding an AND Statement to COUNTIF

G

Guest

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.
 
C

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
 
B

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top