Sum up based on date in the same row

Hi there,

I’d like to sum up a column if and only if other column say so. I thought it could be done with SUMIF. My problem is that I have a sheet with dates on column A and values on column B and I am trying to do weekday report of progress…

My first try was something like this: “=SUMIF(B1:B100,WEEKDAY(A1)=3)”. It is obivious wrong because it sums up all elements or it does nothing. I’d like when I try to sum up B2 I test B1 and not A1. Sum up B3, test A3 and so on.

What about =SUMPRODUCT(B1:B100;WEEKDAY(A1:A100;2)<6)? This formula must calculate the sum of the values for all working days.

If you need data for each day of the week, then use ...WEEKDAY(A1:A100;2)=1 for Monday, ...=2 for Tuesday, etc.

Thanks. Worked fine.