MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Insert a line


Posted by Matthew Schmitt on May 09, 2001 8:17 AM

Is there a way to insert a line between 2 lines that have a formula, and have that formula populate in the proper column in the inserted line? I'm thinking it will have to be a macro that does it. Any help on this would be appreciated.


Posted by Dave Hawley on May 09, 2001 8:30 AM

Hi Matthew

This will insert a row between Row 1 and 2 then place the formula from cell C1 in cell C2


Sub TryThis()
Rows(2).EntireRow.Insert
Rows(2).Range("C1") = Rows(1).Range("C1").Formula
End Sub


Dave


OzGrid Business Applications