Hi everyone...I'm having trouble with the following code. My intent is to click on any cell in column "E" on activesheet, that will triger a "find" on sheet("SM") and copy the found value, plus the cell four to the "found cells" left and 6 cells to the its right. The vaslues in these 3 cells need to be copied to the target row on the activesheet in cells "A" "B" and "C"
I think the "array" is hanging me up and I do not know how to use it...or perhaps there is a better way.
Thanks for any help - Jim A
Code:
Private Sub Lookup(Target As Range)
Application.ScreenUpdating = False
Dim pFind As Range
Set pFind = Sheets("SM").Range("E:E").find(What:=Target.Value, LookIn:=xlValues, LookAt:=xlPart)
If pFind Is Nothing Then MsgBox ("CD# not found on SM Sheet.")
If pFind Is Nothing Then Target.Offset(, -4).Interior.ColorIndex = 6
If pFind Is Nothing Then Exit Sub
[B]Set pFind = pFind.Array(Target.Offset(0, -4), Target, Target.Offset(0, 6)) [/B]'[U]it is hanging up here[/U]
Target.Value = pFind.Array.Value
'Range("A3").Activate
Application.ScreenUpdating = True
End Sub
I think the "array" is hanging me up and I do not know how to use it...or perhaps there is a better way.
Thanks for any help - Jim A
Last edited: