Hi,

I'm trying to write code where if a specific Value, in this case "E0381EAF" exists, input a certain number of rows below this row. I'm pretty close, but I can't get the correct number of rows added.


Sub EntityPercentage()

UsedRows = Worksheets("2. BA&R Customer Product Tab").Range("b1").Value
numberofrows = Worksheets("2. BA&R Customer Product Tab").Range("a1").Value

For Each c In Range("B10:B" & UsedRows)
If c.Value Like "E0381EAF" Then
c.Offset(numberofrows).EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End If
Next c


End Sub

Thanks,
Dan