Question Opening Excel Spreadsheets
You can run the data through a two step process. First import the raw data into a table X (rows) by x (columns). Then, extract all the columns of data into another table (you name them as desired). Then run you comparison against the second table. Finally delete both when done.
The only possible problem you may have is if the names are not normalized (e.g., some Last, First NI and some First. MI. Last). That will cause you some head aces but is doable.
I use this code to Split the "Last, First MI" names in a column to seperate fields since this is how my database is configured. You can probably figure something out for the "First. MI. Last" configuration as well.
You can run the data through a two step process. First import the raw data into a table X (rows) by x (columns). Then, extract all the columns of data into another table (you name them as desired). Then run you comparison against the second table. Finally delete both when done.
The only possible problem you may have is if the names are not normalized (e.g., some Last, First NI and some First. MI. Last). That will cause you some head aces but is doable.
I use this code to Split the "Last, First MI" names in a column to seperate fields since this is how my database is configured. You can probably figure something out for the "First. MI. Last" configuration as well.
Code:
Function SplitName() As String
Dim LastName As String
Dim FirstName As String
Dim MiddleName As String
Dim Title As String
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "[tblRosterData]", CurrentProject.Connection, adOpenDynamic, adLockPessimistic
rst.MoveFirst
Do While Not rst.EOF
If Not rst.BOF And Not rst.EOF Then
LastName = Left(rst![Name], (InStr(rst![Name], " ") - 1))
FirstName = Mid(rst![Name], (InStr(rst![Name], " ") + 1), 99)
rst![LName] = LastName
rst![FName] = FirstName
If InStr(rst![FName], " ") = "0" Then
Else
MiddleName = Mid(rst![FName], (InStr(rst![FName], " ") + 1), 99)
FirstName = Left(rst![FName], (InStr(rst![FName], " ") - 1))
rst![FName] = FirstName
rst![MI] = MiddleName
If InStr(rst![MI], " ") = "0" Then
Else
MiddleName = Left(rst![MI], (InStr(rst![MI], " ") - 1))
Title = Mid(rst![MI], (InStr(rst![MI], " ") + 1), 99)
rst![MI] = MiddleName
rst![Title] = Title
End If
End If
End If
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
End Function