Sub getheaders()
Dim srow As Long
srow = 2
Do Until srow > Cells(Cells.Rows.Count, "A").End(xlUp).Row
If InStr(1, Cells(srow, "A").Value, "table", vbTextCompare) > 0 Then
Range("B" & srow + 2 & ":f" & srow + 2).Value = Cells(srow, "A").Value
srow = srow + 3
Else
srow = srow + 1
End If
Loop
End Sub
|