Solon Aquila
New Member
- Joined
- Sep 24, 2011
- Messages
- 33
Greetings,
I have a spreadsheet in which we sometimes need to insert a row right in the middle of a bunch of filled-out rows.
I'd like to have the inserted row contain the same formulas and conditional formats as the other rows, but not copy the text/values.
I've tried a few things but can't seem to copy/paste just the formulas/conditional formats.
I've seen a few suggestions (PasteSpecial Paste:xlFormats or something) but just don't know enough to make them work.
here's what I'm using now:
Sub Copy_One_Row_Below()
With Range(Cells(ActiveCell.Row, 2), Cells(ActiveCell.Row, 16))
.Copy
.Insert shift:=xlDown
Application.CutCopyMode = False
End With
Cells(ActiveCell.Row + 1, 2) = "=" & Cells(ActiveCell.Row, 2).Address & "+1"
End Sub
It works as long as I don't mind the data being pasted as well.
Any suggestions?
Thanks!
Solon
I have a spreadsheet in which we sometimes need to insert a row right in the middle of a bunch of filled-out rows.
I'd like to have the inserted row contain the same formulas and conditional formats as the other rows, but not copy the text/values.
I've tried a few things but can't seem to copy/paste just the formulas/conditional formats.
I've seen a few suggestions (PasteSpecial Paste:xlFormats or something) but just don't know enough to make them work.
here's what I'm using now:
Sub Copy_One_Row_Below()
With Range(Cells(ActiveCell.Row, 2), Cells(ActiveCell.Row, 16))
.Copy
.Insert shift:=xlDown
Application.CutCopyMode = False
End With
Cells(ActiveCell.Row + 1, 2) = "=" & Cells(ActiveCell.Row, 2).Address & "+1"
End Sub
It works as long as I don't mind the data being pasted as well.
Any suggestions?
Thanks!
Solon