Hello,
I want to compare a list of customers with an existing list. My thought would be to first setup an array of strings so that I could check each name and determine how many letters off a name might be from an existing name (in case there is a typo, name cut off short in raw data, etc.).
I have labeled the worksheet "Data" with all the customer names from the raw data, and the customers are located in column A. The EXISTING customer list is in worksheet "Monthly Sales" and also in column A.
What would be the best way to write that in VBA? It'd be nice to have a separate list then created of the names that don't match the existing customers so that the user could decide if this was a typing error or they are in fact not on the list of existing customers.
I started with a simple for loop but have not gotten very far as I'm not sure how to compare the two lists properly:
Dim myCustomerArray(50) As String
Dim customerRange As Range
Set customerRange = Range("A2:A10")
For counter = 2 To 10
myCustomerArray(counter) = Worksheets("Data").Cells(counter, 1)
Thank you very much for any help you can provide.
-Eric
Bookmarks