On reflection, I prefer this method
Sub insertrowifnamechg()
MyColumn = "A"
For x = Cells(Rows.Count, MyColumn).End(xlUp).Row To 2 Step -1
If Cells(x - 1, MyColumn) <> Cells(x, MyColumn) Then
Rows(x).Resize(16).Insert
End If
Next x
End Sub
Mike
"Mike H" wrote:
> Hi,
>
> Right click your sheet tab, view code and paste this and run it.
>
> Sub insertrowifnamechg()
> MyColumn = "A"
> For x = Cells(Rows.Count, MyColumn).End(xlUp).Row To 2 Step -1
> If Cells(x - 1, MyColumn) <> Cells(x, MyColumn) Then
> For i = 1 To 16
> Rows(x).Insert
> Next
> End If
> Next x
> End Sub
>
> Mike
>
> "Kirk" wrote:
>
> > Is there a macro I could use to insert 16 rows after each change in value in
> > Column A?
> >
> > Thanks,
> > Kirk
|