Counting based on location & dates

J

jpreman

Thanks for reading this post.

Have an Excel sheet which includes among others the following column headings;

Employee No
Employee Name
Date of employment
Location
Salary amount

How could I count the number of employees who had joined the service between
two specific dates (eg. 01 Jan 2005 and 01 Jan 2006), for each location.
 
D

Dave Peterson

Just change those addresses to what you need.

=SUMPRODUCT(--(e2:e10="Leeds"),
--(g2:g10>=date(2005,1,1),
--(g2:g10<=date(2006,5,31))

(And change the 10 to as much as you need--but not the entire column until
xl2007.)

You could put those dates in different cells, too.

My formula counted between Jan 1, 2005 and May 31,2005--only from Leeds.
 
Top