i have a master sheet and a daily sheet, i would like to compare the email addresses in the daily sheet against the addresses in master sheet (both column A) and msgbox a list of any that are not on the master sheet, the problem is i only need to compare up to the 1st dot, but need the full email address in the message box
for example
Master file Daily file
john.co.uk john.com
gim elephant.com
jeff.com.org jeff.co.com
scream.com scream
fish.cpl banana
result in msg box
elephant.com
banana
Dim C_ell As Range, Sh_D As Worksheet, Sh_M As Worksheet
Dim F_ound As Boolean, C_ell2 As Range
Set Sh_D = Sheets("") 'Set the active worksheet first
'Open Master workbook
On Error Resume Next
If IsError(Workbooks("")) Then
Workbooks.Open Filename:=ActiveWorkbook.Path & "\" & ""
Else
Workbooks("").Activate
End If
On Error GoTo 0
'Set the Master sheet for reference
Set Sh_M = Sheets("")
Sh_D.Activate
F_ound = False
For Each C_ell In Range("A1", Cells(Rows.Count, 1).End(xlUp))
Sh_M.Activate
For Each C_ell2 In Range("A1", Cells(Rows.Count, 1).End(xlUp))
If InStr(1, C_ell2, Left(C_ell, InStr(1, C_ell, ".", vbTextCompare)), vbTextCompare) <> 0 Then
F_ound = True
End If
Next
If Not F_ound Then
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = C_ell
End If
F_ound = False
Next
hope it makes sense