View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Count occurances of a name over previous 12 months

=SUMPRODUCT(--($A$2:$A$200=A2),--($B$2:$B$200<=B2),--($B$2:$B$200=DATE(YEAR(B2)-1,MONTH(B2),DAY(B2))))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

" wrote in message
...
Hi

I have a spreadsheet to track operator movements etc
Col A lists the name of the operators
Col B lists the date of an event relating to a particular operator

What I need to be able to do is count back 12 months from the date I
enter in col B and count the number of occurances of the name I
entered in Col A

Eg if Joe Bloggs name is entered on 30/06/08 I need to know how many
time Joe Bloggs appears between 30/06/08 and 30/06/07

Hope this makes sense and you can offer some suggestions

Thanks
Martin