View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Pete_UK
 
Posts: n/a
Default Need to select rows to average based on a value in a different column

I have put your example data in cells A1 to D23, using the top row for
headings. In E2 to E4 I have entered "Mon", "Tue" and "Wed" (without
the quotes), and in F2 I have entered this formula:

=SUMIF(C$2:C$23,E2,D$2:D$23)/COUNTIF(C$2:C$23,E2)

and copied down to F4. You don't have an entry for 12 noon - I've
assumed that is lunchbreak, so each entry in the table is equivalent to
1 hour.

Hope this helps.

Pete