#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the TODAY() function in a SUMIF function JPB Excel Worksheet Functions 4 July 27th 06 04:01 PM
Can I add and IF function to a SUMIF function? adscrim Excel Worksheet Functions 4 January 21st 06 12:32 PM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM
SumIF function ACDenver Excel Discussion (Misc queries) 2 August 17th 05 09:47 PM
SUMIF function yak10 Excel Worksheet Functions 0 February 12th 05 05:12 PM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"