Hi - many thanks to anyone who can help with this!
I need to write a macro to add a new row at the bottom of a table, whilst at the same time copying down a selection of the row above it.
I am able to write a macro to add a new row in at a specific point and fill down the required section but I am not sure how to tell it to always add at the bottom of the dataset.
This is how it currently stands:
Rows("9:9").Select
Selection.Insert Shift:=xlDown
Range("K8:AH8").Select
Selection.AutoFill Destination:=Range("K8:AH9"), Type:=xlFillDefault
Range("K8:AH9").Select
Range("AH25").Select
ActiveWindow.SmallScroll Down:=-1
Range("B8:AH8").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Thanks very much to anyone who can help!
I need to write a macro to add a new row at the bottom of a table, whilst at the same time copying down a selection of the row above it.
I am able to write a macro to add a new row in at a specific point and fill down the required section but I am not sure how to tell it to always add at the bottom of the dataset.
This is how it currently stands:
Rows("9:9").Select
Selection.Insert Shift:=xlDown
Range("K8:AH8").Select
Selection.AutoFill Destination:=Range("K8:AH9"), Type:=xlFillDefault
Range("K8:AH9").Select
Range("AH25").Select
ActiveWindow.SmallScroll Down:=-1
Range("B8:AH8").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Thanks very much to anyone who can help!