Index Match Using With Date Ranges

jlenn10

New Member
Joined
Oct 14, 2020
Messages
6
Office Version
  1. 365
Platform
  1. MacOS
Hey - I am trying to do an index match for multiple criteria. My issue is that the 2nd criteria are date ranges. What I am trying to determine is if there is a match in the P2 cell and column C:C in the "Auths" sheet, then look to see if the date in cell J2 is within the date range of columns E:F on the "Auths" sheet. Note - there's 2 columns for a start date and an end date.

Any idea if I am able to do this through an index match? Here's what I've written so far:

=INDEX(Auths!C:C,MATCH('UMD074,UMD063,UMD010'!P2,Auths!D:D,0))

Thanks for your help
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Please clarify.
Find P2 in Auth C:C?
If found, check to see if J2 Date is within the same Auth row, in range defined by Auth E:F?
Inclusive of start and end dates?
Return what, True / False / The row number ?
 
Upvote 0
Sorry for the mistake -

If P2 (member ID) is in Auths D:D (member ID)
If found, check to see if J2 (date of service) is within the start and end date range on E:F in Auths. Inclusive of start and end dates.
If true, return the auth # in C:C in Auths.

Here's how the "Auths" tab looks (had to remove PHI due to HIPAA)

Col 1Col 2Auth NumberMember IDAuthorization Start DateAuthorization End Date
RedactedRedactedauth 1member 1
2/17/20​
5/17/20​
RedactedRedactedauth 2member 1
3/10/20​
6/8/20​
RedactedRedactedauth 3member 1
3/6/20​
6/4/20​
RedactedRedactedauth 4member 1
2/5/20​
5/5/20​
RedactedRedactedauth 5member 1
9/15/20​
12/14/20​
RedactedRedactedauth 6member 1
10/13/20​
1/11/21​
RedactedRedactedauth 7member 2
10/1/20​
12/30/20​
RedactedRedactedauth 8member 2
10/20/20​
1/18/21​
RedactedRedactedauth 9member 2
10/15/20​
1/13/21​
RedactedRedactedauth 10member 2
11/20/20​
2/18/21​
RedactedRedactedauth 11member 2
11/20/20​
2/18/21​
RedactedRedactedauth 12member 2
11/9/20​
2/7/21​
RedactedRedactedauth 13member 2
12/15/20​
3/15/21​
RedactedRedactedauth 14member 3
1/24/20​
4/23/20​
RedactedRedactedauth 15member 3
2/20/20​
5/20/20​
 
Upvote 0
Is this data typical?
member 2 and 16/10/20 matches Auth Numbers auth 7 and auth 9 !!!!!! Which rather complicates the issue.
 
Upvote 0
In healthcare it is. The auth numbers span over a specific date range. Often times providers will get a new auth that overlaps the existing auth which causes confusion. I'm not worried about the overlap, I just need to prove that there was an auth on file for the member/date of service.
 
Upvote 0
This should return the first instance.
Not sure how efficient it will be on large dat set.
Example is Excel2010 hence the Ctrl + Shift + Return


Book1
IJKLMNOPQR
1DateMember IDAuthorisation
216/10/2020member 2auth 7
UMD074,UMD063,UMD010
Cell Formulas
RangeFormula
R2R2=INDEX(Auths!C:C,MATCH(TRUE,(Auths!D:D=P2)*(Auths!E:E<=J2)*(Auths!F:F>=J2)*(ROW(D:D))>0,0))
Press CTRL+SHIFT+ENTER to enter array formulas.


Hope it helps.
 
Upvote 0
Solution
Thank You! I had to change the last section to (ROW(I:I))>P,P)) since P:P is the member ID in the main tab. I was able to get 85% of the results which is fine. Saved us 8+ hours of manual look ups.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top