Hi Try this,
Option Explicit
Sub Test()
Dim wsMain As Excel.Worksheet
Dim wsOther As Excel.Worksheet
Dim searchRange As Excel.Range
Dim cl As Excel.Range
' Set main page
Set wsMain = ThisWorkbook.Sheets("Sheet1")
Set searchRange = wsMain.Range("A:A")
For Each wsOther In ThisWorkbook.Sheets
If Not (wsOther.Name = wsMain.Name) Then
For Each cl In searchRange
If GetSeachTextExist(wsOther, cl.Value) Then
wsMain.Cells(cl.Row, cl.Column + 1) = "True"
End If
Next
End If
Next
End Sub
' Function to search the text
Private Function GetSeachTextExist(wsSearch As Excel.Worksheet, searchText As String) As Boolean
Dim SearchResult As Excel.Range
GetSeachTextExist = False
With wsSearch
Set SearchResult = .Cells.Find(What:=searchText, after:=.Cells(.Cells.Count), LookIn:=xlValues, lookat:=xlWhole, SearchOrder:=xlByRows, searchdirection:=xlNext, MatchCase:=False)
If Not SearchResult Is Nothing Then
GetSeachTextExist = True
End If
End With
End Function
Regards,
Salim
Bookmarks