Thread: array formula
View Single Post
  #5   Report Post  
Jim May
 
Posts: n/a
Default

=SUMPRODUCT(--(WEEKDAY(A1:A30,1)=2),B1:B30)


worked for me;
HTH
"Morrigan" wrote in
message ...

=SUMPRODUCT(--(WEEKDAY(A1:A30,2)=1),B1:B30)

Jonathan Cooper Wrote:
Can't figure out why this formula isn't working. Column A1:A30 contain
dates, starting with 9/1/05 and incrementing by one day. Column
B1:B30
contain numbers. I want to look at column A, and if it's a Monday,
then I
want to sum the values in column B.

={SUMPRODUCT((WEEKDAY(A1:A30,2)=1*($B$1:$B$30)))}

My only guess is that you can't use the WEEKDAY function as an array.
However, when I look at that part of the formula in the formula editor,
it
looks like it is working.



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile:
http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=465922