i am trying to create a pop out box to search for a certain value on the 2nd column, as i am still new to vba coding, i could only do this much through googling.
What i'm trying to do was (all these were to be done in macro), to find a certain value, and then when the program found the certain value, it will copy the entire row where the value was and paste it into a new sheet in excel ( with the same header )
this is the code that i have so far.
Sub macrotest()
x = 2
Do While Cells(x, 1) <> ""
If Cells(x, 2) = "TEST" Then
Worksheets("Sheet1").Rows(x).Copy
Worksheets("Sheet2").Activate
erow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Paste Destination:=Worksheets("Sheet2").Rows(erow)
End If
Worksheets("Sheet1").Activate
x = x + 1
Loop
End Sub
as you can see from above, i'm trying to copy the circled row into a new sheet.