View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
jbressma jbressma is offline
external usenet poster
 
Posts: 5
Default Formula using a date range

David - thanks for the response. Unfortunately it does not work. I believe
it is counting everything greater than July 2007 and everything less than
June 2008. The backend data has data going back to 2001 so I think its not
exactly catching data within that range.

"David Biddulph" wrote:

=SUMPRODUCT(--(YEAR(Roster!$E$2:$E$646)=2007), --(MONTH(Roster!$E$2:$E$646)=7),
--(Roster!$C$2:$C$646=B8), --(Roster!$H$2:$H$646="Non-Exp"))
+SUMPRODUCT(--(YEAR(Roster!$E$2:$E$646)=2008), --(MONTH(Roster!$E$2:$E$646)<=6),
--(Roster!$C$2:$C$646=B8), --(Roster!$H$2:$H$646="Non-Exp"))
--
David Biddulph

"jbressma" wrote in message
...
I currently have this formula in a spreadsheet:

=SUMPRODUCT(--(YEAR(Roster!$E$2:$E$646)=2007), --(Roster!$C$2:$C$646=B8),
--(Roster!$H$2:$H$646="Non-Exp"))

Essentially it counts data based on three criteria, the first being if the
data includes a date in 2007.

My company changed from a fiscal year to a calendar year. Is there a way
I
can modify the above formula to go from counting if a date included "2007"
to
counting if a date included July 1, 2007 - June 30, 2008????