I'm hoping 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. 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 loop but have not gotten very far as I'm not sure how to compare the two lists properly:
Sub Sort()
Dim myCustomerArray(50) As String
Dim counter As Integer
Dim i As Integer
Set i = 1
For counter = 2 To 33
If Worksheets("Data").Cells(counter, 8) = "US40" Then
myCustomerArray(i) = Worksheets("Data").Cells(counter, 1)
i = i + 1
MsgBox myCustomerArray(counter)
End If
Next
End Sub
This gets the raw data customer list, but how would i compare this array with another existing array and remove matches/sort alphabetically?
Bookmarks