a noob here who just started using VBA and macros this week and i am trying to copy rows with a certain value to another sheet in order to form a new table. the idea is that wherever i have an A in a row (as shown in pic) i must copy that row and insert it in a new sheet. there is 2368 rows in the table so i tried the following code but it still wont work. thanks for helping guys !
Sub find_copy_row()
Sheets.Add.Name = "Equilibrage.actif"
Dim Rng As Range
Dim Workrng As Range
For i = 2 To i = 2368
Set Workrng = Range(Rows("i"))
For Each Rng In Workrng
If Rng.Value = "A" Then
Rows("i").Select
Selection.Copy
Sheets("Equilibrage.actif").Activate
Rows("1:1").Insert
End If
Next
i = i + 1
Next
End Sub