I'm writing code to copy rows and then insert copies of the same rows below. The numer of times it should copy and paste those rows is defined as Unit 1-7. After each for loop, I would like the code to insert a different row that sepeates each block. Please see the code below. The bold italic portion is what I need help with. The SOR row is not copying/pasting in.
'define number of catalysts used
Range("D7").Select
c = ActiveCell.Value
m = c
NameofSheet = ActiveSheet.Name
'Naming each row and expected number of units
'Each name corresponds to a row based on the cat. and the loading method
Dim Cat1 As Range
Set Cat1 = Rows(15)
Dim Cat2 As Range
Set Cat2 = Rows(16)
Dim Cat3 As Range
Set Cat3 = Rows(17)
Dim Cat4 As Range
Set Cat4 = Rows(18)
Dim Cat5 As Range
Set Cat5 = Rows(19)
Dim Cat6 As Range
Set Cat6 = Rows(20)
Dim Cat7 As Range
Set Cat7 = Rows(21)
Dim SOR As Range
Set SOR = Rows(29)
Unit1 = Application.RoundUp(Sheets(NameofSheet).Range("K4") / 10, 0) - 1
Unit2 = Application.RoundUp(Sheets(NameofSheet).Range("K5") / 10, 0) - 1
Unit3 = Application.RoundUp(Sheets(NameofSheet).Range("K6") / 10, 0) - 1
Unit4 = Application.RoundUp(Sheets(NameofSheet).Range("K7") / 10, 0) - 1
Unit5 = Application.RoundUp(Sheets(NameofSheet).Range("K8") / 10, 0) - 1
Unit6 = Application.RoundUp(Sheets(NameofSheet).Range("K9") / 10, 0) - 1
Unit7 = Application.RoundUp(Sheets(NameofSheet).Range("K10") / 10, 0) - 1
'The units are defined correctly. To prove to yourself, uncomment the following block of code.
Range("C50").Select
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("C15").Select 'set active cell to first catalyst
For j = 1 To Unit1 'loops for each row that needs to be created
Cat1.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Next j
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown
For j = 1 To Unit2
Cat2.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Next j
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown
'define number of catalysts used
Range("D7").Select
c = ActiveCell.Value
m = c
NameofSheet = ActiveSheet.Name
'Naming each row and expected number of units
'Each name corresponds to a row based on the cat. and the loading method
Dim Cat1 As Range
Set Cat1 = Rows(15)
Dim Cat2 As Range
Set Cat2 = Rows(16)
Dim Cat3 As Range
Set Cat3 = Rows(17)
Dim Cat4 As Range
Set Cat4 = Rows(18)
Dim Cat5 As Range
Set Cat5 = Rows(19)
Dim Cat6 As Range
Set Cat6 = Rows(20)
Dim Cat7 As Range
Set Cat7 = Rows(21)
Dim SOR As Range
Set SOR = Rows(29)
Unit1 = Application.RoundUp(Sheets(NameofSheet).Range("K4") / 10, 0) - 1
Unit2 = Application.RoundUp(Sheets(NameofSheet).Range("K5") / 10, 0) - 1
Unit3 = Application.RoundUp(Sheets(NameofSheet).Range("K6") / 10, 0) - 1
Unit4 = Application.RoundUp(Sheets(NameofSheet).Range("K7") / 10, 0) - 1
Unit5 = Application.RoundUp(Sheets(NameofSheet).Range("K8") / 10, 0) - 1
Unit6 = Application.RoundUp(Sheets(NameofSheet).Range("K9") / 10, 0) - 1
Unit7 = Application.RoundUp(Sheets(NameofSheet).Range("K10") / 10, 0) - 1
'The units are defined correctly. To prove to yourself, uncomment the following block of code.
Range("C50").Select
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("C15").Select 'set active cell to first catalyst
For j = 1 To Unit1 'loops for each row that needs to be created
Cat1.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Next j
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown
For j = 1 To Unit2
Cat2.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Next j
SOR.Select
Selection.Copy
Selection.Insert Shift:=xlDown