oleg_v
12-22-2010, 07:15 AM
hi
i have this macro:
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim nm As Range
On Error GoTo eh
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Dim Found As Range, It
It = Target.Value
Set Found = Sheets("sheet3").Columns("g").Find(what:=It, LookIn:=xlValues, lookat:=xlWhole)
If Not Found Is Nothing Then
MsgBox It & " found in " & Found.Address(False, False), vbInformation
Else
MsgBox It & " not found.", vbExclamation
End If
End If
eh:
End Sub
ho can i display in the " MsgBox It & " found in " & Found.Address(False, False), vbInformation" the value in the differant column but in the same row with the foun value
thanks
i have this macro:
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim nm As Range
On Error GoTo eh
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Dim Found As Range, It
It = Target.Value
Set Found = Sheets("sheet3").Columns("g").Find(what:=It, LookIn:=xlValues, lookat:=xlWhole)
If Not Found Is Nothing Then
MsgBox It & " found in " & Found.Address(False, False), vbInformation
Else
MsgBox It & " not found.", vbExclamation
End If
End If
eh:
End Sub
ho can i display in the " MsgBox It & " found in " & Found.Address(False, False), vbInformation" the value in the differant column but in the same row with the foun value
thanks