Sum based on date from a cell

G

Guest

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
 
P

Peo Sjoblom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top