SumIf Function

S

Scott Halper

I have data in the current format:
Date Amount
1/1/2007 1.00
1/15/2007 2.50
2/2/2007 3.00

I want to be able to reference the whole range but only sum the values
that are in January. I have the following formula, however it is
returning a 0.

=SUMIF('Data Sheet'!A2:A20,and(>=1/1/2007,<=2/1/2007),'Data
Sheet'!I2:I20).

I appreicate the help.

Thanks,
Scott
 
S

Scott Halper

Thanks.

try one way

=SUMPRODUCT((YEAR('Data Sheet'!A2:A20)=2007)*(MONTH('Data
Sheet'!A2:A20)=1)*'Data Sheet'!I2:I20)
adjust to suit if u want to try..
 
Top