Find a match and copy the corresponding data

Viewed 30

I am total new beginner to VBA coding. I am trying to find matches between Column A in Sheet 1 to Column A in Sheet 2 of an excel workbook and when a match is found, that complete row has to be copied to Sheet 1. I am successful until it finds a match but unable to code the do action after it finds a match. Please help!

1 Answers

The code like that you can use it to copy from sheet(2) coulman A TO sheet(1) by the code inside sub() or use macro thats it.

Sub Macro1()
'
' Macro1
'

'
    Columns("A:A").Select
    Selection.Copy
    Sheets("sheet(1)").Select
    Columns("A:A").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
End Sub
Related