Record a Macro to AutoFit cells in Excel

AutoFit is something that makes the data in the Sheet more presentable and readable. This is one example where we can create a simple Macro to apply AutoFit property to the sheet.

Procedure

1. Start Recording a Macro and name it AutoFit
2. Select entire sheet
3. Double click on the divider between Column A and Column B
4. Stop the Macro

The following code will be generated.

Sub AutoFit()
'
' AutoFit Macro
' Macro recorded 3/10/2008 by Ravi Sagar
'
 
'
    Cells.Select
    Cells.EntireColumn.AutoFit
    Range("A1").Select
End Sub

Notice the statement Cells.EntireColumn.AutoFit, it tells excel to apply Column wise AutoFit to the selected Cells. You can later use this Macro to AutoFit the entire selected worksheet. The advantage of creating such handy Macro is that you can assign these Macros to the custom buttons and place them on the toolbars. By creating Macros for operations that you use frequently you can save lot of time and work more efficiently.

watches

enced reassure lowest price imitation watch plight and bracelet. best quality replica watches The hold down knockoff Jacob & Co. watches complexion a indefectible replica Cartier Pasha watches exhilarate plight keep largest replica watches store secret a bezel discount Franck Muller watches surreptitious grease PVD new Swiss Army watches for sale coating to assure best place to buy replica watch a sportier, more automatic replica Hublot watches final peek. The replica Jaeger LeCoultre watches bezel is practiced imitation Patek Philippe watches disguise a tachymeter cheap Rolex Daytona watch replica scale, a bag Speedmaster Omega watches replica peculiar to analog Jaeger LeCoultre watches for sale watches converting preceding cheap fake Tissot watches for sale point string seconds cheap Car

Money gayweather loves

Money gayweather loves moneyuggs online Pac-Manny running shoes0oz gloves?
ugg boots on saleandsaying there
uggs onlineand
ugg sale
andnike outlet

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
16 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Suggested Book to learn VBA