Quote Originally Posted by p45cal View Post
Small changes to existing code:
Sub Step1()
  Dim r, count As Range
  Dim temp As Long
  Dim rng As Range
  Dim ws As Worksheet
  
  Set ws = Sheets("Test File 190218 - M - Copy")
  lastRow = ws.Cells(ws.Rows.count, "A").End(xlUp).Row
  ws.Columns("A:A").Insert Shift:=xlToRight
  Set rng = ws.Range("A1:A" & lastRow)
  rng.Value = "OR"
  Worksheets("Test File 190218 - M - Copy").Activate
  Application.ScreenUpdating = False
  Application.Calculation = xlCalculationManual
  Set r = Range("B:D")
  Set count = Range("C:C")
  lastRow = Range("C" & Rows.count).End(xlUp).Row
  For n = lastRow To 1 Step -1
    temp = Range("C" & n)
    If (temp > 1) Then
      Rows(n + 1 & ":" & n + temp).Insert Shift:=xlDown
      Rows(n + 1 & ":" & n + temp).Columns(1).Value = "PC"
      Rows(n + 1 & ":" & n + temp).Columns(12).Value = Cells(n, 12).Value
    End If
  Next n
  Application.ScreenUpdating = True
  Application.Calculation = xlCalculationAutomatic
End Sub
Hi,

Just wanted to say a massive thank you for your help with the above. It works exactly how I wanted it to. I really can't thank you enough. Wishing you all the best