VBA to Copy, Open a New Workbook and Save

GCLIFTON

Board Regular
Joined
Feb 11, 2016
Messages
60
I need help. I need the vba to

Copy cells A10:G
Open a New Excel workbook and Formatting R paste
Then Bold the Top Line A1:D1 and that is it.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
You would want something like this:
Code:
Range("A10:G200").Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
Range("A1:D1").Font.Bold = True

you didn't say how big the area to copy is.
 
Upvote 0
From Column A10 over to Columen G10 all the way down until there is no information and is there a way to Paste by Formatting R. Columns E, F, G that are being copied are highlighted in Grey.
 
Last edited:
Upvote 0
There are a number of options for pastespecial. I'm not sure which will do what you want. I usually paste values and numberformats and then format the information the way I want. I'm sure there is an option to copy the cell formats too.

If you erase the parameter in the editor and hit space it will show the the possible values for the parameter.
 
Upvote 0
If the Macro could Highlight those cells all the down with the give data that would be great E1:G
So then the Macro would say
Range A1:G1. Font. Bold= True
Then could you also add
Grind line all of the given data and Center all data
 
Upvote 0

Forum statistics

Threads
1,215,374
Messages
6,124,571
Members
449,173
Latest member
Kon123

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