I am trying to identify all rows in which the number 68700 is displayed and then add a row below aswell as copying said row and then pasting a duplicate of it. It is adding this one line in every row until 500. I am sure there is an easy way to this but I am not proficient enough in VBA to figure it out and have a Deadline by monday. Please help
For Z = 2 To 500
If Range("E" & Z) = 68700 Then
Rows(Z + 1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows(Z).Copy
Rows(Z + 1).PasteSpecial xlPasteValues
End If
Next Z
Aucun commentaire:
Enregistrer un commentaire