ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SumIf Function (https://www.excelbanter.com/excel-worksheet-functions/127401-sumif-function.html)

Scott Halper

SumIf Function
 
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


driller

SumIf Function
 
I want to be able to reference the whole range but only sum the values
that are in January.


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..

--
*****
birds of the same feather flock together..



"Scott Halper" wrote:

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



Scott Halper

SumIf Function
 
Thanks.


driller wrote:
I want to be able to reference the whole range but only sum the values
that are in January.


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..

--
*****
birds of the same feather flock together..



"Scott Halper" wrote:

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




ShaneDevenshire

SumIf Function
 
This is really the same but a shorter approach if you're only worried about
the month:

=SUMPRODUCT((MONTH(A1:A47)=1)*B1:B47)

or

=SUM((MONTH(A1:A47)=1)*B1:B47)

array entered.
--
Cheers,
Shane Devenshire


"Scott Halper" wrote:

Thanks.


driller wrote:
I want to be able to reference the whole range but only sum the values
that are in January.


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..

--
*****
birds of the same feather flock together..



"Scott Halper" wrote:

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





driller

SumIf Function
 
you're welcome
HTH
--
*****
birds of the same feather flock together..



"Scott Halper" wrote:

Thanks.


driller wrote:
I want to be able to reference the whole range but only sum the values
that are in January.


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..

--
*****
birds of the same feather flock together..



"Scott Halper" wrote:

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






All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com