Tguillaume
New Member
- Joined
- Aug 2, 2021
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hi all,
I currently have two tables. Table 1 includes a patient's Unique ID and when they visited the hospital (Hospital Visit). In Table 2, there is also the Unique ID, but instead of Hospital Visit I have the date that the patient's primary doctor called to follow up with the patient after their hospital visit. I have made the data simpler below, but it shows how it is organized.
I need to create a third table which pulls the Doctor's Call date which is closest to the Hospital Visit date, but not before the Hospital Visit date. For example, Table 3 should look like this:
I need help with a formula that I would use in column J (Doctor's Call).
I've tried using combinations of IF(), COUNTIF(), AND(), and other formulas to achieve this goal but I am stuck. I would appreciate any help in learning how to match on the Unique IDs and then pull in the date I desire from a range of dates in the adjacent cell. I know I can use INDEX MATCH to pull in the most recent Doctor's Call, but this may not be the one I need (the Doctor's Call that is soonest after the Hospital Visit).
Thanks for any help!
I currently have two tables. Table 1 includes a patient's Unique ID and when they visited the hospital (Hospital Visit). In Table 2, there is also the Unique ID, but instead of Hospital Visit I have the date that the patient's primary doctor called to follow up with the patient after their hospital visit. I have made the data simpler below, but it shows how it is organized.
I need to create a third table which pulls the Doctor's Call date which is closest to the Hospital Visit date, but not before the Hospital Visit date. For example, Table 3 should look like this:
I need help with a formula that I would use in column J (Doctor's Call).
I've tried using combinations of IF(), COUNTIF(), AND(), and other formulas to achieve this goal but I am stuck. I would appreciate any help in learning how to match on the Unique IDs and then pull in the date I desire from a range of dates in the adjacent cell. I know I can use INDEX MATCH to pull in the most recent Doctor's Call, but this may not be the one I need (the Doctor's Call that is soonest after the Hospital Visit).
Thanks for any help!