Good Start But I Have a Flaw

  • Thread starter Thread starter DM
  • Start date Start date
D

DM

Hello

When I enter data into my Datasheet I begin by adding a
new row within the range, enter the dates, etc and
incident number...this is row A thru G..I then take rows
H thru AE from the row above and copy the formulas into my
new row that I just entered my dates etc.....

How can I modify this code to be attached to a button so I
can automaticaly copy this information so I don't have to
do it manually everytime..this code will copy H thru AE
but it shifts the cells...I don't need to shift the cells
but only copy the info....Unless there is a way to add a
new row and copy the formulas in H thru AE at the same
time....

Sub Shift_Down()
With Range("H2:AE2")
.Insert Shift:=xlDown
End With
End Sub


Thanx David
 
try
Sub insertrowswithformulas()
With ActiveCell
..Rows.Insert
Range(Cells(.Row - 2, "H"), Cells(.Row - 2, "AE")).Copy _
Cells(.Row - 1, "H")
End With
End Sub
 
This does copy the formulas but it shifts cell A down..so
it does not insert a new row, it just adds a new cell to
colunm A. How do I modify to not shift cell A down but add
a new row??

Thanx Much Don...you are a great help...
 
Back
Top