VBA to split table and retain formatting

John42

New Member
Joined
Jan 25, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I'm looking for a way to split a large table of data in to multiple workbooks, based on "Country Name", and need to retain the formatting (column width, row height, cell colour, font etc) of the original file. I assume VBA is the way to go for this and have found a code that can split the file, however it does not copy the formatting. I am very much a novice when it comes to VBA so I wonder would any of you have a VBA code that could achieve this, or at least point me in the right direction? Thank you!

John
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi John42. Welcome to the forum. Just a thought to hopefully get you started. You could copy the entire tab, which should retain the formatting, and then delete the part you don't need in the new tab. I hope that makes sense and at least gets this question some response.
 
Upvote 0

Forum statistics

Threads
1,215,659
Messages
6,126,074
Members
449,286
Latest member
Lantern

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