LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Cycle thru & format all columns

I need to cycle thru each column, autofit it, and add 2 character
spaces.

My current code is:

Cells.Select
Selection.EntireColumn.Hidden = False
Selection.EntireRow.Hidden = False

Cells.EntireColumn.AutoFit
Range("A1").Select
Wide = Selection.ColumnWidth
Selection.ColumnWidth = Wide + 2
Range("B1").Select
Wide = Selection.ColumnWidth
Selection.ColumnWidth = Wide + 2
Range("C1").Select
Wide = Selection.ColumnWidth
Selection.ColumnWidth = Wide + 2
Range("D1").Select
Wide = Selection.ColumnWidth
Selection.ColumnWidth = Wide + 2

Etc, etc, etc, all the way to

Range("IV1").Select
Wide = Selection.ColumnWidth
Selection.ColumnWidth = Wide + 2

Although this is functional, it looks like a mess. Any help in
cleaning it up would be greatly appreciated.

~Arawn
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a graph with 2-cycle X 3-cycle log-log graph paper? Charles A. Wilson Charts and Charting in Excel 1 December 17th 09 03:03 AM
cycle time mmb Charts and Charting in Excel 1 August 21st 08 03:24 PM
Time Cycle Antonio Excel Discussion (Misc queries) 7 December 3rd 07 11:01 PM
How do I keep result from 1 iteration cycle to use in next cycle? sgl8akm Excel Discussion (Misc queries) 0 July 27th 06 08:28 PM
How do I cycle through all of the worksheets DMB Excel Discussion (Misc queries) 1 January 9th 06 12:21 AM


All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"