Hello! I have the following code below and it works great but I need to add to it if possible!
I am running a macro in sheet1 on active cell column C and matching it to sheet2 column B cell that works fine. But what I need now is when the match is found on sheet2 column B I need to copy the row adjacent to it in column C and paste it in sheet1 column D beside the active cell I was previously searching. Is this possible if so I could use some help. Below is the code I am using now.
Sub Test()
rngY = ActiveCell.Value
Sheets("Sheet2").Select
Columns("B:B").Select
Selection.Find(What:=rngY, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
End Sub
I am running a macro in sheet1 on active cell column C and matching it to sheet2 column B cell that works fine. But what I need now is when the match is found on sheet2 column B I need to copy the row adjacent to it in column C and paste it in sheet1 column D beside the active cell I was previously searching. Is this possible if so I could use some help. Below is the code I am using now.
Sub Test()
rngY = ActiveCell.Value
Sheets("Sheet2").Select
Columns("B:B").Select
Selection.Find(What:=rngY, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
End Sub