Macro required to add new row at bottom of table

adamdc20

New Member
Joined
Apr 10, 2006
Messages
18
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!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,402
Messages
6,171,911
Members
452,432
Latest member
TiffanyMcllwain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top