Number of hrs worked in a week, based on dates in a different column

G

Gregg

Hi. I'm hoping someone will give this a try. I'd like to enter a function
into each cell in column D so that the total hours worked for the previous
week appears each Sunday. For instance, cell D6 would display 11, the sum
of C2:C6 (note this is a short week). Cell D20 would display 22.5, the sum
of C7:C20. On some days, no work at all is performed, but on other days
multiple tasks are performed. The only cells in column D that should
display a value are the Sunday's... all other cells should display nothing.
Thanks very much for your help!!

Gregg.

A B
C D
1 DATE TASK
DAILY_HRS WEEKLY_HRS
2 Thu, Mar-01-2009 Stuff I worked on 4
3 <blank>
4 Fri, Mar-02-2009 Stuff I worked on 5
5 Sat, Mar-03-2009 Stuff I worked on 2
6 Sun, Mar-04-2009 <blank>
7 Mon, Mar-05-2009 Stuff I worked on 4
8 <blank> Stuff I worked on 2
9 <blank> Stuff I worked on 1
10 Tue, Mar-06-2009 Stuff I worked on 2
11 <blank> Stuff I worked on 3
12 Wed, Mar-07-2009 Stuff I worked on 2
13 <blank> Stuff I worked on 1
14 <blank> Stuff I worked on 0.5
15 <blank> Stuff I worked on 2
16 Thu, Mar-08-2009 <blank>
17 Fri, Mar-09-2009 Stuff I worked on 3
18 <blank> Stuff I worked on 2
19 Sat, Mar-10-2009 <blank>
20 Sun, Mar-11-2009 <blank>
 
B

Bob Phillips

=IF(WEEKDAY($A2)<>1,"",SUM($C$1:$C2)-SUM($D$1:$D1))

BTW 1st Mar is a Sun according to my calendar.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 

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