Borders Around Cell Fill Down

Vlr516

New Member
Joined
Sep 11, 2017
Messages
22
This forum has been wonderful helping me learn about macros and vba. I come back to the group to see if I can get assistance on how to fill down a border to the last row.

On a pre-designed template with the All Borders around each cell beginning row 6 - row 27 to column H. My macro brings data in from multiple other sheets and sometimes the final Row on the activesheet is longer than what was preformatted. Once I have all the data into place on my activesheet, how do I write the code to grab only the border from A6:H6 and fill down to the Finalrow?

Thanks.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try:
Code:
Sub CopyBorders()
    ActiveWorkbook.Styles("Normal").IncludeBorder = False
        Range("A6:H6").Copy
        With Range("A7:H" & Range("A" & Rows.Count).End(xlUp).Row)
            .PasteSpecial -4122
            .Style = "Normal"
        End With
    ActiveWorkbook.Styles("Normal").IncludeBorder = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,222,564
Messages
6,166,819
Members
452,075
Latest member
babykilers

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