PC Review


Reply
Thread Tools Rate Thread

Comparing Date Ranges in one Table to Date Ranges in another Table

 
 
Mike C
Guest
Posts: n/a
 
      21st Dec 2009
I am trying to compare a sheet with claims (with from and through
dates) to another sheet with amounts applicable to a different and
potentially overlapping set of date ranges.

In Sheet 1, each record consists of a claim ID, a member ID, and the
from and thru dates.


In Sheet 2, there is a Member ID, from and thru dates (more than one
set of dates per member), and an applicable dollar amount associated
with that date range.


What I am trying to do is to show the dollar amount in Sheet1 for
each
claim that matches with the date ranges shown in Sheet 2.


Although my ultimate goal is to prorate (by day) the amounts in Sheet
2 to any instances where there is a match in Sheet 1, I am trying to
figure out how to first pull in the amounts from Sheet 2 in all
instances where there is a match with the dates in Sheet 1.


Is there VBA code that could compare the date range from sheet 2 to
the date range in sheet 1 (for a particular member) and then produce
the monthly amount in any instance where there is a match between the
two date ranges?

Any suggestions would be greatly appreciated.


So, to show the example.


Sheet 1 has:
Claim ID Member ID From Date Thru Date Amount
a33 555-333 4/1/05 5/30/05 PULL
FROM SHEET 2 IF MATCH
b22 312-444 3/7/07 6/15/08 PULL
FROM SHEET 2 IF MATCH
e44 312-444 7/7/08 8/15/08 PULL
FROM SHEET 2 IF MATCH
c12 767-575 etc etc


Sheet 2 has:
Member ID From Date Thru Date Amount
555-333 4/7/05 5/30/05 50
312-444 3/7/07 6/15/08 75
767-575 etc etc 200

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date ranges based on related table Dorian Microsoft Access Queries 2 27th Jan 2010 08:10 PM
Comparing Date Ranges in one Table to Date Ranges in another Table Mike C Microsoft Excel Discussion 3 22nd Dec 2009 05:38 PM
Re: Comparing date ranges Carl Gilbert Microsoft VB .NET 0 23rd Aug 2004 09:16 AM
Comparing Date Ranges =?Utf-8?B?Y2hlcm1hbg==?= Microsoft Access VBA Modules 5 13th Jun 2004 06:29 PM
using date ranges in a pivot table Matt Elms Microsoft Excel Programming 0 26th Nov 2003 09:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:11 AM.