Paste Linked Excel Cells While Preserving Borders
Question details
Preserve source cell borders when pasting linked cells into an Excel worksheet.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A VBA macro creates linked formulas on a destination sheet, and the user needs the source borders to appear when printing.
- Observed behavior
- The destination cells contain links but do not retain the source cell borders.
Identify the source range and the top-left destination cell. Confirm that the visible lines are applied cell borders, not worksheet gridlines.
Update the VBA macro to paste links and then formats
Use this method when the links and borders need to be created automatically by a macro.
Paste Link creates the formulas; a separate formats-only paste applies the source formatting without replacing those formulas. The formats paste copies all cell formats, not just borders.
In Excel, open Developer > Visual Basic and select the module containing your macro.
Adapt this example to your sheet names and ranges: Sub PasteLinkedCellsWithBorders() Dim sourceRange As Range Dim destinationCell As Range Set sourceRange = ThisWorkbook.Worksheets("Sheet1").Range("A1:C5") Set destinationCell = ThisWorkbook.Worksheets("Sheet2").Range("A1") sourceRange.Copy destinationCell.Worksheet.Activate destinationCell.Select ActiveSheet.Paste Link:=True sourceRange.Copy destinationCell.PasteSpecial Paste:=xlPasteFormats Application.CutCopyMode = False End Sub
Run the macro from Developer > Macros. Check that destination cells contain linked formulas, then open File > Print to preview the borders.

Paste links and source formats manually
Use this approach for a one-time paste or to test the result before changing a macro.
Work with formatted spreadsheets in WPS Office
WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. Open compatible Excel files and continue editing with minimal migration, though it does not fix an Excel VBA macro.

Frequently Asked Questions
Why do my linked cells not have the source borders?
Paste Link creates formulas that refer to the source cells, but it does not necessarily copy their formatting. Copy the source again and use Home > Paste > Paste Special > Formats on the destination.
Will pasting formats remove my linked formulas?
No. Paste Special > Formats applies cell formatting without replacing the linked formulas. It can, however, replace other destination formatting such as number formats and fills.
How can I tell whether the lines are borders or gridlines?
Select the source cells and inspect the Borders menu on the Home tab. Gridlines are worksheet display lines; applied borders are cell formatting that can be copied with Paste Special > Formats.
How do I check whether the borders will print?
Open File > Print and inspect the print preview. If the lines are gridlines rather than borders, check the worksheet's gridline print settings or apply cell borders from the Home tab.




