Copy/Paste Borders only, not number formats, fonts, etc.

BBDudley

New Member
Joined
Aug 5, 2008
Messages
1
In Excel 2003, is there an easy way to paste borders into other cells on-the-fly without affecting other formatting settings (Number format, Font, Cell Shading, etc) in the destination cells?

In short, I need PasteSpecial|Borders Only to exist -- the exact opposite of PasteSpecial|AllExceptBorders.

More detail:

  • I have pivot tables with Borders set for subtotals and totals.
  • Therefore, when I update the tables with new data, the location of the borders change.
  • After updating the pivot tables, I would like to copy and paste these borders (only) from the updated pivot table onto to all data and formulas to the left of it. (For example, Copy All of Column C and Paste Special, [some Borders-only function] into Columns J:AE)
  • The columns to the left of the table are all formulas with Formats that need to remain unchanged: Number (dates, currency), Font (style, size), Alignment, Patterns (shading). All I want applied to them are the updated Borders.

How do I get the borders and only the borders copied onto the data without changing any other cell formatting?


Thank you for your assistance!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I had never tried that before and after doing a little reading in the help files and looking at the options in the paste special dialog box and VBA attributes, it seems that you have two options. Either copy the borders from an otherwise empty cell, or use the Format Cells facility to put your borders where you want them. I don't believe you can do what you want with a copy and paste as long as there is data in the source cell.
 
Upvote 0
Well, there is one way. Assuming cell B3 has borders, You could use code something like this:

Code:
Range("B3").Copy Range("D5")
Range("D5").ClearContents
Code:
 
Upvote 0

Forum statistics

Threads
1,215,762
Messages
6,126,740
Members
449,335
Latest member
Tanne

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