Thread: Add a Row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip[_3_] Chip[_3_] is offline
external usenet poster
 
Posts: 133
Default Add a Row

This should get you started:
Sub insertrow()
lastrow = ActiveSheet.UsedRange.Rows.Count
lastcolumn = ActiveSheet.UsedRange.Columns.Count
Rows(lastrow).Select
Selection.Insert Shift:=xlDown
Cells(lastrow - 1, 1).Select
Range(ActiveCell, ActiveCell.Offset(0, lastcolumn)).Select
Selection.AutoFill Destination:=Range(ActiveCell,
ActiveCell.Offset(1, lastcolumn)), Type:=xlFillDefault
End Sub

As for how it gets started you have the option to have the macro run
with a shortcut, when a certain cell is selected, when a certain
cell's value is changed, on the click of a command button...i would
need to know what u want tho for me to help u on that