Hi,
I have a string, which contains one or more names that I need to compare to a list of names in a worksheet called "User Names". If there is a match, I need to count how many of the names in "User Names" can be found in the string. One name can appear multiple times in the string or different names can appear in the string.
I tried to loop through the names in "User Names" worksheet and use InStr Function to find the position. If it's greater than 0, then there is a match. But, I can't seem to make it work properly. Is there any other efficient method that I can use. Can anyone suggest a VBA code to solve this?
Thank you!
I have a string, which contains one or more names that I need to compare to a list of names in a worksheet called "User Names". If there is a match, I need to count how many of the names in "User Names" can be found in the string. One name can appear multiple times in the string or different names can appear in the string.
I tried to loop through the names in "User Names" worksheet and use InStr Function to find the position. If it's greater than 0, then there is a match. But, I can't seem to make it work properly. Is there any other efficient method that I can use. Can anyone suggest a VBA code to solve this?
Thank you!