Clutch1255
New Member
- Joined
- Dec 27, 2013
- Messages
- 3
Hello Forum Friends.
I'm sorry to have to ask, but I have exhausted the time I have to search existing threads for the answer I'm desperately looking for. I'm hoping someone can expeditiously return what I feel SHOULD be a rather simple solution.
Ultimately, I need the spreadsheet I'm working on to reflect which doctor (identified by his/her NPI) each patient (identified by his/her MRN) encountered most frequently.
Here's the set-up:
Column A: List of 7000 UNIQUE patient MRNs.
Column B: Currently blank, but will hopefully reflect which NPI each MRN is associated with most frequently in the subsequent table.
TABLE
Column C: MRNs from Column A, duplicated as many times as the associated patient was encountered by one of our affiliated doctors. So if a patient was seen 20 times, his/her MRN will appear in 20 rows.
Column D: The NPI associated with the doctor the patient encountered during each visit.
Here is a fictional example to illustrate the setup:
[TABLE="width: 750"]
<tbody>[TR]
[TD]A) Patient MRNs (Unique List)[/TD]
[TD]B) Doctor NPI Most Frequently Encountered [/TD]
[TD]C) Patient MRNs (One Row/Encounter)[/TD]
[TD]D) Doctor NPI (Encountered During Each Visit)[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]879[/TD]
[TD]12345[/TD]
[TD]987[/TD]
[/TR]
[TR]
[TD]23456[/TD]
[TD]321[/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]34567[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]45678[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]987[/TD]
[/TR]
[TR]
[TD]56789[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]67890[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]789[/TD]
[/TR]
[TR]
[TD]78901[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]321[/TD]
[/TR]
[TR]
[TD]89012[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]321[/TD]
[/TR]
[TR]
[TD]90123[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]432[/TD]
[/TR]
</tbody>[/TABLE]
I'd like to use a simple Vlookup formula, but I can't figure out what I would need to add in order to search for ALL instances of each MRN and return the NPI that's associated the most number of times, rather than just searching for the initial instances of each MRN and returning whichever NPI happens to be associated with it.
I hope this explanation of what I'm hoping to accomplish/what data I have is clear.
Thank you for your time and attention thus far!
I'm sorry to have to ask, but I have exhausted the time I have to search existing threads for the answer I'm desperately looking for. I'm hoping someone can expeditiously return what I feel SHOULD be a rather simple solution.
Ultimately, I need the spreadsheet I'm working on to reflect which doctor (identified by his/her NPI) each patient (identified by his/her MRN) encountered most frequently.
Here's the set-up:
Column A: List of 7000 UNIQUE patient MRNs.
Column B: Currently blank, but will hopefully reflect which NPI each MRN is associated with most frequently in the subsequent table.
TABLE
Column C: MRNs from Column A, duplicated as many times as the associated patient was encountered by one of our affiliated doctors. So if a patient was seen 20 times, his/her MRN will appear in 20 rows.
Column D: The NPI associated with the doctor the patient encountered during each visit.
Here is a fictional example to illustrate the setup:
[TABLE="width: 750"]
<tbody>[TR]
[TD]A) Patient MRNs (Unique List)[/TD]
[TD]B) Doctor NPI Most Frequently Encountered [/TD]
[TD]C) Patient MRNs (One Row/Encounter)[/TD]
[TD]D) Doctor NPI (Encountered During Each Visit)[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]879[/TD]
[TD]12345[/TD]
[TD]987[/TD]
[/TR]
[TR]
[TD]23456[/TD]
[TD]321[/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]34567[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]45678[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]987[/TD]
[/TR]
[TR]
[TD]56789[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]879[/TD]
[/TR]
[TR]
[TD]67890[/TD]
[TD][/TD]
[TD]12345[/TD]
[TD]789[/TD]
[/TR]
[TR]
[TD]78901[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]321[/TD]
[/TR]
[TR]
[TD]89012[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]321[/TD]
[/TR]
[TR]
[TD]90123[/TD]
[TD][/TD]
[TD]23456[/TD]
[TD]432[/TD]
[/TR]
</tbody>[/TABLE]
I'd like to use a simple Vlookup formula, but I can't figure out what I would need to add in order to search for ALL instances of each MRN and return the NPI that's associated the most number of times, rather than just searching for the initial instances of each MRN and returning whichever NPI happens to be associated with it.
I hope this explanation of what I'm hoping to accomplish/what data I have is clear.
Thank you for your time and attention thus far!