Hi, I am receiving a "Run Time Error 13: Type Mismatch" with the following code. Any thoughts? I cant figure out what to do.
On this line:
Ins = Sh.Cells(n, "A").Value
On this line:
Ins = Sh.Cells(n, "A").Value
Code:
Sub InsertRows()
Dim End_Row As Long, n As Long, Ins As Long
Dim Sh As Worksheet
For Each Sh In ActiveWorkbook.Sheets
If Left(Sh.Name, 9) = "Labor BOE" Then
End_Row = Sh.Range("L" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
For n = End_Row To 3 Step -1
[U][I][B] Ins = Sh.Cells(n, "A").Value[/B][/I][/U]
If Ins > 0 Then
Sh.Range("A" & n + 1 & ":A" & n + Ins).EntireRow.Insert
Sh.Range("C" & n & ":L" & n).Copy Destination:=Sh.Range("C" & n + 1 & ":L" & n + Ins)
End If
Next n
End If
Next Sh
MsgBox "BOE Generation Complete"
End Sub