Thread: Sumif weekday
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Sumif weekday

=SUMPRODUCT(--(WEEKDAY(A2:A40)=1),B2:B40)

Adjust your range to suit, you can not use whole column pior to XL-2007



"Sungibungi" wrote:

I'm trying to sumif different days of the week. Table is setup as below:

A. Date Date Date Date Date ......
B. Data Data Data Data Data ......

I know that =weekday(Date,1) will give me a 1 through 7 of the date Sunday
through Saturday. Somehow, I feel like =sumif(A:A,weekday(A:A)=1,sum(B:B))
would give me the sum of all Sundays but it's not quite working.

What am I'm doing wrong? Can someone help me out? I don't want to make row A
into a static Sun, Mon, Tue. Then it's easy since =sumif(A:A,="Sun",sum(B:B))
would probably work.

Thanks so much for all the help in advance.