Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
thewiz1972
 
Posts: n/a
Default Find category value based on date range?

Here's the problem:

I have several worksheets, split out by month, with a list of dates, a description and a value.

A1 A2 A3
1/13/2005 Bill1 ?Value
1/15/2005 Bill2 ?Value
1/15/2005 Bill3 ?Value

Etc.

In another worksheet I have a list a bills, their value, and the date range for which they are valid

Bill Name StartDate EndDate Value
Bill1 1/1/2005 2/28/2005 $100.00
Bill1 3/1/2005 4/30/2005 $90.00
Bill2 1/1/2005 12/31/2005 $50.00
Bill3 1/1/2005 6/30/2005 $100.00
Bill3 7/1/2005 12/31/2005 $75.00

What I need to do is find the value of bill x (A2) in the worksheet with the list of bills, date ranges and values, based on the date value in A1 so that column A3 can be populated with the result.

Any help would be greatly appreciated.


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Find category value based on date range?

You may use a formula like this on Sheet1 (cell C2):
=SUMPRODUCT(--(Sheet2!$A$2:$A$6=B2),--(Sheet2!$B$2:$B$6<A2),--(Sheet2!$C$2:$C$6A2),Sheet2!$D$2:$D$6)

Change the Sheet2 ranges to reflect your data
Hope this helps,
Miguel.

"thewiz1972" wrote:

Here's the problem:

I have several worksheets, split out by month, with a list of dates, a description and a value.

A1 A2 A3
1/13/2005 Bill1 ?Value
1/15/2005 Bill2 ?Value
1/15/2005 Bill3 ?Value

Etc.

In another worksheet I have a list a bills, their value, and the date range for which they are valid

Bill Name StartDate EndDate Value
Bill1 1/1/2005 2/28/2005 $100.00
Bill1 3/1/2005 4/30/2005 $90.00
Bill2 1/1/2005 12/31/2005 $50.00
Bill3 1/1/2005 6/30/2005 $100.00
Bill3 7/1/2005 12/31/2005 $75.00

What I need to do is find the value of bill x (A2) in the worksheet with the list of bills, date ranges and values, based on the date value in A1 so that column A3 can be populated with the result.

Any help would be greatly appreciated.


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
thewiz1972
 
Posts: n/a
Default Find category value based on date range?

That worked great. Thanks so much.

One question tho. What is the function of the '--' before the first
three array definitions?

-Mark

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Find category value based on date range?

It ensures that the TRUE/FALSE values from the comparisions are treated as
1/0. The first - makes it a number (-1 or 0), and the second one change the
sign again, to the desired 1 or 0

Miguel.

"thewiz1972" wrote:

That worked great. Thanks so much.

One question tho. What is the function of the '--' before the first
three array definitions?

-Mark


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
thewiz1972
 
Posts: n/a
Default Find category value based on date range?

Very cool. Perhaps you could answer one more question for me.
In Sheet2 I will be adding new bills from time to time so is there a
way to properly reference this dynamic range in the formula you've
provided?

Thanks,
-Mark



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Find category value based on date range?

Sure, I use to recommend this link, it has good examples and explanations:
http://www.ozgrid.com/Excel/DynamicRanges.htm

Miguel.

"thewiz1972" wrote:

Very cool. Perhaps you could answer one more question for me.
In Sheet2 I will be adding new bills from time to time so is there a
way to properly reference this dynamic range in the formula you've
provided?

Thanks,
-Mark


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
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Determining Date X based on Other dates MIchel Khennafi Excel Worksheet Functions 1 May 3rd 06 04:45 PM
Sumproduct based on Date range MIchel Khennafi Excel Worksheet Functions 1 April 28th 06 04:51 PM
I need a formula to find rows within a date range in one column? M. Penney Excel Worksheet Functions 5 May 12th 05 12:32 AM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 1 October 28th 04 09:52 AM


All times are GMT +1. The time now is 10:50 PM.

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"