Count the number of people in a table that meet a given target in consecutive months?
Posted on 2011-04-29
I need to use vba code to count the number of people that meet a target in consecutive months
example the target is 30 and above thus the total number of people that meet this target in consecutive months where the second month is 31/12/2010 is 2
Sam gets 50 in the first month and 45 in the second
peter gets 40 in the firts month and 40 in he second , thus 2 people meet the target in consecutive months.
The tabel itself cosnsist of over 10,000 records with over 2000 individuals is there a way to do this using vba?
Date Target Name
31/11/2010 50 Sam
31/11/2010 40 Dan
31/11/2010 40 Kent
31/11/2010 30 Peter
31/12/2010 45 Sam
31/12/2010 40 Kent
31/12/2010 25 Peter
31/01/2011 40 Chris
31/01/2011 10 Sam