Selecting Dates in Excel

  • Thread starter Thread starter CAGdorf
  • Start date Start date
C

CAGdorf

Hi all--- Here is my problem: I have a worksheet that
contains dates and hours worked. And i want to setup
fields that calculate the totals based on which month it
is in. For Example: I have 1/31/04 | 4 | and then the
worksheet is split so down below I always show the totals
where it says Jan | 4 ---- What I want to know is-- is
there a way to create a formula or something that will
add all of Januarys totals up for me and put them in the
January Cell? I have to hand select them every time, and
I dont work every day, and some entries might have more
then 1 day (for different jobs) I know how to do it in
Access, or SQL, but its setup in Excel and has been used
with this client for a while. THanks!
 
Here's one way:

=SUMPRODUCT((A1:A6>=DATE(2004,1,1))*(A1:A6<=DATE
(2004,1,31))*B1:B6)

Dates in A, hours worked in B.
 
Back
Top