Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default sum a range based on Qtr and Year

Hi, I need to do two things - first, write a formula to sum a range of
dollars based on a range of dates. For example:

1/1/2009 300000
2/1/2009 100000
6/1/2010 150000
4/15/2011 90000

If the range of dates is named EqPurDt and the range of dollars is named
CapEqPur, I need to be able to sum the dollars spent in Qtr1-2009, Qtr2-2009,
etc., then for entire year 2010, year 2011, year2012, etc.

I also have name ranges in the worksheet where the years are defined. PAS =
2009, YR2 = 2010, YR3 = 2011, YR4 = 2012, et. I'd like to use date name
ranges in the formulas if possible, since this is a template that is used
from year to year.

Here's my first unsuccessful effort - I'm getting $0 as a result:
=SUMPRODUCT(--(EqPurDt=1/1/2009),--(EqPurDt<=3/31/2009),CapEqPur) Does
anyone have any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default sum a range based on Qtr and Year

Excel will evaluate the dates you entered as arithmetic expressions. Use the
DATE function:
=SUMPRODUCT(--(EqPurDt=DATE(2009,1,1)),--(EqPurDt<=DATE(2009,3,31)),CapEqPur)

"Dana M" wrote:

Hi, I need to do two things - first, write a formula to sum a range of
dollars based on a range of dates. For example:

1/1/2009 300000
2/1/2009 100000
6/1/2010 150000
4/15/2011 90000

If the range of dates is named EqPurDt and the range of dollars is named
CapEqPur, I need to be able to sum the dollars spent in Qtr1-2009, Qtr2-2009,
etc., then for entire year 2010, year 2011, year2012, etc.

I also have name ranges in the worksheet where the years are defined. PAS =
2009, YR2 = 2010, YR3 = 2011, YR4 = 2012, et. I'd like to use date name
ranges in the formulas if possible, since this is a template that is used
from year to year.

Here's my first unsuccessful effort - I'm getting $0 as a result:
=SUMPRODUCT(--(EqPurDt=1/1/2009),--(EqPurDt<=3/31/2009),CapEqPur) Does
anyone have any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default sum a range based on Qtr and Year

That worked! I thank you for your kindness!

"bapeltzer" wrote:

Excel will evaluate the dates you entered as arithmetic expressions. Use the
DATE function:
=SUMPRODUCT(--(EqPurDt=DATE(2009,1,1)),--(EqPurDt<=DATE(2009,3,31)),CapEqPur)

"Dana M" wrote:

Hi, I need to do two things - first, write a formula to sum a range of
dollars based on a range of dates. For example:

1/1/2009 300000
2/1/2009 100000
6/1/2010 150000
4/15/2011 90000

If the range of dates is named EqPurDt and the range of dollars is named
CapEqPur, I need to be able to sum the dollars spent in Qtr1-2009, Qtr2-2009,
etc., then for entire year 2010, year 2011, year2012, etc.

I also have name ranges in the worksheet where the years are defined. PAS =
2009, YR2 = 2010, YR3 = 2011, YR4 = 2012, et. I'd like to use date name
ranges in the formulas if possible, since this is a template that is used
from year to year.

Here's my first unsuccessful effort - I'm getting $0 as a result:
=SUMPRODUCT(--(EqPurDt=1/1/2009),--(EqPurDt<=3/31/2009),CapEqPur) Does
anyone have any ideas?

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
Calculate Amount Based on Year N Excel Worksheet Functions 3 November 10th 08 05:58 PM
Calc Prorated Cost based on Specific Days in a Given Month & Year Range (Revisited..) [email protected] Excel Discussion (Misc queries) 8 October 2nd 07 12:15 AM
How do I change date based on year Hannah Excel Worksheet Functions 4 April 11th 07 12:52 PM
Get Data based on Month and Year karstens Excel Worksheet Functions 1 August 2nd 06 12:42 AM
Determine every wednesday based off year Millerk Excel Discussion (Misc queries) 2 March 2nd 06 06:23 PM


All times are GMT +1. The time now is 12:52 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"