Iam trying to insert rows based on number of entries in another worksheet, and this code doesn't seem to work. Can anyone help me out here. Thanks in advance.
Code
Sub Insert_S2NUS()
Dim Count As Integer
Count = WorksheetFunction.CountA(Worksheets("Sheet1").Range("W:W")) - 1
Dim numrow
numrow = Count - 500
If Count >= 500 Then
Worksheets("Sheet3").Range("a10").Activate
If IsNumeric(numrow) Then
For I = 1 To numrow
ActiveCell.EntireRow.Select
ActiveCell.EntireRow.Insert Shift:=x1Down
Selection.FillDown
Next I
End If
End If
End Sub
Display More