hi Sugibala,
maybe this code helps you get closer to your solution:
Sub Main() Dim oWS_Target As Worksheet Dim oWS_Source As Worksheet Dim rg_Target As Range Dim rg_Found As Range Dim sSrchItem As String On Error Resume Next Set oWS_Source = ThisWorkbook.Sheets(1) Set oWS_Target = ThisWorkbook.Sheets(2) Set rg_Target = oWS_Target.Columns(2).UsedRange sSrchItem = "country" 'just an example - get your sSearchItem from where ever you need to Set rg_Found = rg_Target.Find(sSrchItem).Offset(0, 1) If Not rg_Found Is Nothing Then MsgBox " found " & sSrchItem & ". your value is in " & _ oWS_Target.Name & " Cell " & rg_Found.Address Else MsgBox "no match with " & sSrchItem End If Set rg_Found = Nothing Set rg_Target = Nothing Set oWS_Source = Nothing Set oWS_Target = Nothing On Error GoTo 0 End Sub




Reply With Quote