Index/Match to find matching value based on date range and other identifier.

Henbob6

New Member
Joined
Jun 8, 2015
Messages
2
Good Morning -

I am trying to match an authorization number which was active at the time of service. The date ranges assigned to the authorizations numbers sometimes overlap. I would like to pull the authorization number based on earliest start date.

My data is on two different sheets:
SHEET1

COLUMN A COLUMN B
DATE of SERVICE Client #, CPT, Carrier*
6/23/2014 AB22 90837 ACME
8/25/2014 AB22 90837 ACME
10/13/2014 VV47 90837 ACME
11/21/2014 AB22 90837 ACME
12/1/2014 VV47 90837 ACME


LOOKUP
COLUMN A COLUMN B COLUMN C COLUMN D
Client #, CPT, Payer* Start Date End Date Auth #
AB22 90837 ACME 10/18/2014 1/18/2015 104333902
AB22 90837 ACME 7/18/2014 10/18/2015 104174225
VV47 90838 ACME 7/18/2014 10/18/2014 N/A-378
VV47 90838 ACME 10/18/2014 1/18/2015 N/A-396

So for AB22, Date of Service 6/23 should be N/A, 8/25 should be 104174225, and 11/21 should be 104333902.

Taking baby steps:
Sheet1 - C2
Match Client/CPT/Carrier
=MATCH(B2,Lookup!B:B,0)

Sheet1 - D2
INDEX Date of Service against Start/End Date
={INDEX(Lookup!$D$1:$D$40, SMALL(IF((Sheet1!A3>=Lookup!$B$1:$B$40)*(Sheet1!A3<=Lookup!$C$1:$C$40), MATCH(ROW(Lookup!$D$1:$D$40), ROW(Lookup!$D$1:$D$40))), ROW(AAA1)))}

(no data is in AAA1 - I got this formula from another site, and I'm parroting as best I can.)

I think my next step is to incorporate the MATCH by Client/CPT/Carrier into the INDEX formula, but I am stuck.

*(Combined 3 data columns into 1 for lookup purposes.)
 
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Maybe something like this.
Adjust ranges to match your data.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.

In this example formula in C2 can just be copied down.
Excel Workbook
ABCDE
1DATE of SERVICEClient #, CPT, Carrier*Auth #
26/23/2014AB22 90837 ACME#N/A
38/25/2014AB22 90837 ACME104174225
410/13/2014VV47 90838 ACMEN/A-378
511/21/2014AB22 90837 ACME104333902
612/1/2014VV47 90838 ACMEN/A-396
7
8
9
10Client #, CPT, Payer*Start DateEnd DateAuth #
11AB22 90837 ACME10/18/20141/18/2015104333902
12AB22 90837 ACME7/18/201410/18/2015104174225
13VV47 90838 ACME7/18/201410/18/2014N/A-378
14VV47 90838 ACME10/18/20141/18/2015N/A-396
15
Sheet
 
Upvote 0
Wow, thank you so much for your time, AhoyNC! You saved me hours of banging my head! I truly appreciate your help.
 
Upvote 0
You're welcome. Thanks for the feedback and welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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