Tom, first of all I want to thank you very much for your help so far. Your
solution almost works, but I was having some problems with it. I’m not very
good with VB so I wasn’t able to get around the error caused by “iâ€. I guess
the value of “i†needs to be defined as the active cell’s row number some
how, but I wasn’t getting anywhere with the Help files on how to do this.
Instead, I tried the following:
ActiveCell.EntireRow.Copy
ActiveCell.Offset(RowOffset:=1, ColumnOffset:=0).Activate
Selection.EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
On Error Resume Next
Set rng = ActiveCell.EntireRow.SpecialCells(xlConstants)
On Error GoTo 0
If Not rng Is Nothing Then
rng.ClearContents
End If
This works great, unless the row copied has nothing but blank cells and
cells containing formulas. In that case, the macro returns “Run-time error
‘424’: Object required†for the line “If Not rng Is Nothing Thenâ€.
One more tweak will do the trick, I’m sure.
Thanks for your help,
Brett