Having empty cells in that range will cause trouble.
If you leave A1 empty, then put =month(a1), you'll see excel returns 1.
So you could check to see if the cell is non-empty in your formula.
=SUMPRODUCT(--(MONTH(calc!C4:C65536)=B4),--(calc!C4:C65536<""))
I wouldn't use this style: calc!c4:calc!c65536.
And if possible, I'd try to limit that range to something smaller (but large
enough!).
Tim wrote:
Hi,
These formulas: "=SUMPRODUCT(--(MONTH(Calc!C4:Calc!C65536)
=B4))" and "=SUMPRODUCT(--(MONTH(Calc!C4:Calc!C65536)
=B4),Calc!M4:Calc!M65536)" work perfect for all months
except for January. The result if the month in C3 =1 is
always wrong. Columns "C"and"M"are updating periodically
by inserting a new row at the top of them. Can you help
me to fix this problem?
--
Dave Peterson
|