Simplify Formatting Macro

RNoose

New Member
Joined
Oct 30, 2006
Messages
27
Hope this doesn't bore you with its simplicity, but to me it's uberly complicated at this stage of my vba development. I recorded a macro to do a number of formatting changes to a weekly workbook, but the code is long and cumbersome. I've been reading up on macros, and everything I read says to try to avoid using Select/Activate, but the recorded code is full of those references. I've tried drafting a code from scratch using website references, but can't seem to draft all the formatting steps I get when I record the code. Below is the formatting I'm trying to accomplish. Can anyone point me in the direction of a good macro training guide or advise me how to write this macro from scratch? I've read Excel Vba Programming for Dummies front to back, but still consider myself a vba dummy. But I fully recognize the power in programming, and am eager to learn.

7 sheet wkbk, but formatting will only apply to sheets 1-5. The data on each worksheet varies in size, so at the very least range A:N captures it all on each worksheet.

page orientation - landscape
fit to 1 wide, 10 tall
font size = 8
wrap text
Set No Fill to all cells that currently have white fill
row height = 36.00
column width:
A = 8, B = 3, C = 14, D = 7, E = 14, F = 3, H:K = 10, L = 4, M = 13, N = 30
Find - Replace:
Col A - "Option" replace with "Opt."
Column F - "Location" replace with "Loc." & If State name spelled out - replaced with state abbreviation.

Can something like this be accomplished within the scope of an individual macro, or will I have to piecemeal it with multiple macros?

Windows 7 Pro Sp 1
Excel 2010
 
Exactly what Par said in this case regarding the Autofit. Thanks again for everyone's help. With your help, I was able to piece it all together to accomplish what I wanted.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
way to go. That is what makes this community so great.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

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