[Solved] I need a way to Select perticular rows from one excel sheet and copy them in other if condition matches


A simple macro to do your task,

Sub copyrow()
Dim i As Long, j As Long
j = Sheets("SheetA").Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To Sheets("SheetB").Cells(Rows.Count, "A").End(xlUp).Row
    If InStr(Cells(i, 2), "abc") > 0 Then
        Sheets("SheetA").Cells((j + 1), "A") = Cells(i, 1)
        Sheets("SheetA").Cells((j + 1), "B") = Cells(i, 2)
        j = Sheets("SheetA").Cells(Rows.Count, "A").End(xlUp).Row
    End If
Next i
End Sub

This macro copies the rows from SheetB to SheetA if abc is present (case sensitive). Let me know if you need anything else.

4

solved I need a way to Select perticular rows from one excel sheet and copy them in other if condition matches