Hi
I'm trying to loop through my sheet and say that if the cell in row J says "segment missing doc", then shift down the corresponding lines L-S cells.
(and then recalculate the formula in column K)
I tried something like this..
sub test()
Dim Lastrow As Long
Dim cell As Long
For cell = Range("J" & Rows.Count).End(xlUp).row
If cell.Value = "segment missing doc" Then
Range("L:S").Insert Shift:=xlDown
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K" & Lastrow)
Range("V2").Select
Selection.AutoFill Destination:=Range("V2:V" & Lastrow)
End If
Next
End sub ()
I'm trying to loop through my sheet and say that if the cell in row J says "segment missing doc", then shift down the corresponding lines L-S cells.
(and then recalculate the formula in column K)
I tried something like this..
sub test()
Dim Lastrow As Long
Dim cell As Long
For cell = Range("J" & Rows.Count).End(xlUp).row
If cell.Value = "segment missing doc" Then
Range("L:S").Insert Shift:=xlDown
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K" & Lastrow)
Range("V2").Select
Selection.AutoFill Destination:=Range("V2:V" & Lastrow)
End If
Next
End sub ()