Help with linking events in one table to specific location in another table

dennisridgley

New Member
Joined
Aug 12, 2014
Messages
4
Good morning!

We are a healthcare provider and need to track where falls occur. Patients can be in one or more locations and have one or more falls in a perod. I've been trying to use INDEX/MATCH functions to identify the location for each fall, by first identiying the patient by their ID (uique identifier) from the first table to the second table then by the date range, but can't get it done. In the example below, Mr. Skywalker has two falls. The first on 12/25 should have a locatio of "North" the second on 12/28 should have the location of "Central". I'm new to VBA which is why I'm trying do do Excel functions, but a Macro that solves this will be welcome as well. Thanks for your help!! - Dennis

PatientIDLocationDate of FallType of FallLocation
Skywalker, Luke123456Home12/25/2017Fall with Injury
Skywalker, Luke123456SNF/Nursing Home12/28/2017Fall with Injury
IDPatient LastPatient FirstAdmit dateTERMINATION_DATEStart of CareEnd of Caredbo_RES_BASIC.ORGANIZATION_NAMELocationReferral
234567RenKylo12/24/2017 12/24/2017 Admitted-HomeSouthMedical Hospital
123456SkywalkerLuke12/9/2017 12/18/201712/25/2017Admitted-HomeNorthFowl Medical
123456SkywalkerLuke12/9/2017 12/26/201712/28/2017Relocation-Home to Care CenterCentralFowl Medical
123456SkywalkerLuke12/9/2017 12/29/2017 Relocation-Care Center to FacilityWestFowl Medical
456789YodaMister11/19/201712/18/201711/19/201712/12/2017ReAdmitSouthCenter Clinic
456789YodaMister11/19/201712/18/201712/14/201712/18/2017DischargeSouthCenter Clinic
<colgroup><col width="108" style="width: 81pt; mso-width-source: userset; mso-width-alt: 3949;"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <col width="110" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4022;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;" span="2"> <col width="64" style="width: 48pt;" span="2"> <col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;"> <tbody> </tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Dennis,

Maybe try;


Book1
ABCDEFGHI
1IDPatient LastPatient FirstAdmit dateTERMINATION_DATEStart of CareEnd of CareLocation
2234567RenKylo12/24/201712/24/2017Admitted-HomeSouth
3123456SkywalkerLuke12/09/201712/18/201712/25/2017Admitted-HomeNorth
4123456SkywalkerLuke12/09/201712/26/201712/28/2017Relocation-Home to Care CenterCentral
5123456SkywalkerLuke12/09/201712/29/2017Relocation-Care Center to FacilityWest
6456789YodaMister11/19/201712/18/201711/19/201712/12/2017ReAdmitSouth
7456789YodaMister11/19/201712/18/201712/14/201712/18/2017DischargeSouth
8
9
10PatientIDLocationDate of FallType of FallLocation
11Skywalker, Luke123456Home12/25/2017Fall with InjuryNorth
12Skywalker, Luke123456SNF/Nursing Home12/28/2017Fall with InjuryCentral
Sheet1
Cell Formulas
RangeFormula
F11=INDEX($I$2:$I$7,MATCH(B11&D11,INDEX($A$2:$A$7&$G$2:$G$7,),0))
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

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