Это не очень эффективно, но, возможно, это даст вам некоторые идеи о том, как достичь того, что вы ищете.Удачи
Sub RunThisCode()
Dim rcell As Range, Column2PlaceValues As Range, RangeOfEmailAddress As Range
Set Column2PlaceValues = Range("M:M").EntireColumn
Set RangeOfEmailAddress = Rangee("C2:L1000")
For Each rcell In RangeOfEmailAddress.Cells
If IsEmpty(rcell) Then
'do nothing
ElseIf Not (Test4Match(rcell, Column2PlaceValues)) Then
Cells(Rows.Count, Column2PlaceValues.Column).End(xlUp).Offset(1, 0) = rcell.Value
End If
Next rcell
End Sub
Private Function Test4Match(rcell As Range, Column2PlaceValues As Range) As Boolean
On Error GoTo NOPE
Test4Match = Application.WorksheetFunction.Match(rcell.Value, Column2PlaceValues, 0)
Exit Function
NOPE:
End Function