Sub Macro2()
'
' Macro1 Macro recorded by the Noob Simulator
'
Application.ScreenUpdating = False
On Error Resume Next
If ActiveSheet.AutoFilterMode Then ActiveSheet.ShowAllData
Const M = "MESSAGE", S = "FilterList"
'Const M = "MESSAGE"
With Sheets
If .Count > 1 Then
.Item(1).Activate
If Selection.Column > ActiveSheet.UsedRange.Columns.Count Then Msgbox "Select a header !", 64, M _
Else ActiveSheet.UsedRange.AutoFilter Selection.Column, Application.Transpose(.Item(2).UsedRange), 7
Else
.add(, .Item(1)).Name = "FilterList"
Msgbox "Add your search list in column A and proceed!!", 64, M
End If
End With
With Sheets(S)
.[A1].CurrentRegion.Columns(2).Formula = "=IF(ISNUMBER(MATCH(A1," _
& ActiveSheet.UsedRange.Columns(Selection.Column).Address(, , , True) & ",0)),""-"",""Not Exist"")"
.[A1].CurrentRegion.Columns(2).Value = .[A1].CurrentRegion.Columns(2).Value
.[A1].CurrentRegion.Columns.AutoFit
End With
Application.ScreenUpdating = True
End Sub