I am looking to change a macro that I have from a loop to find the last empty row, to inserting a new at the top row. My reference cell is C5, so the new row would be at C6. I would like to insert data (=model!S44:AZ44)
here is what I have....that I would like to change
' this macro copies the data by code and pastes it to the history data sheets
'
' 290
'This section captures the date and pastes it into the "history data" sheet.
Sheets("Data Input").Select
Range("AA1").Select
Application.CutCopyMode = False
Selection.Copy
Selection.Insert Shift:=xlDown
Range("D6").Select
Sheets("290").Select
Range("c5").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
'this section copies the model data and goes to the appropriate sheet to paste
Sheets("model").Select
Range("S44:Az44").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("290").Select
Range("D5").Select
'this section finds the next open row and pastes the data
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False