I am trying to get a list of all the distinct values from a column based on a vlookup type match.
For example:
Sheet 1:
(colA) (colB) (colC)
Health System Name EMR PMR
System A
System B
System C
System D
Sheet 2 (where all the data is)
Healthy System Name Tech ID Vendor
System A PMR ClinicA
System A EMR ClinicE
System A EMR ClinicA
System B EMR ClinicB
System B PMR ClinicC
System C PMR ClinicA
System C PMR ClinicB
System C EMR ClinicD
System C PMR ClinicD
System C EMR ClinicG
I want to be able to search the name of the healthy system from colA in sheet 1 in colA of Sheet 2...and based on whether it is a PMR or EMR...return the number of unique values from the Vendor column into one cell in sheet 1 under the appropriate column.
SO under the EMR column in Sheet 1 for System A, I want the distinct values from the vendor column in sheet 2 that have the tech ID as "EMR"for System A.
In this case it would be : ClinicA, ClinicE
Any help would be greatly appreciated!
You would not be able to do this only with excel formulas and you would need a VBA solution. If your
Sheet1
contains data like below,and
Sheet2
,Try this simple VBA code ,
Your output would be,
If you have the new TEXTJOIN function then enter this as an array formula with CSE.
Fill right and down.
imgur seems broken right now. http://imgur.com/a/xCqQb
If you do not have access to the newer textjoin worksheet function search this site for responses to questions with the textjoin for alternatives.