View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Sum based on date from a cell

One way

=SUMPRODUCT(--(YEAR(A2:A50)=YEAR(D4)),--(MONTH(A2:A50)=MONTH(D4)),B2:B50)

Where A2:A50 holds the dates and B2:B50 what you want to sum


--
Regards,

Peo Sjoblom


"Will" wrote in message
...
Ok maybe I can explain this better than my previous attempt... I am
trying
to stream line my work flow so I have created a "Monthly Results" sheet
that
has a single field D4 where the user will input the first day of the month
ex. "03/01/2007".

I have below D4 a cell that should return the sum of the "hours on"
(column
B) for the month represented by the single date entry found in D4. How
can I
set my criteria to ref the single date in D4 but look for the entire
month?

thanks
- will