#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Autofit Columns

I know when dates are entered into cells the column automatically autofits.
Is there any way to do that with text. Instead of clicking on
column/format/autofit?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Autofit Columns

You could use an event macro that autofits the changed cell's columns whenever
you make a change.

If you want to try, rightclick on the worksheet tab that should have this
behavior. Select view code and paste this into the code window:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Target.EntireColumn.AutoFit
End Sub

But be aware that most macros destroy the Edit|Undo and Edit|Redo stack. (I'd
just do it manually so I wouldn't lose that.)





falcios wrote:

I know when dates are entered into cells the column automatically autofits.
Is there any way to do that with text. Instead of clicking on
column/format/autofit?
Thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Autofit Columns

A simpler way to make a column autofit is to hover over the right hand edge
of the column label. When the cursor changes to the double arrow, then double
click.

"falcios" wrote:

I know when dates are entered into cells the column automatically autofits.
Is there any way to do that with text. Instead of clicking on
column/format/autofit?
Thanks.

Reply
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
FormatRowAutofit bparker Excel Discussion (Misc queries) 1 May 31st 06 04:46 PM
autofit columns in pivot table Pastel Hughes Excel Discussion (Misc queries) 2 January 5th 06 10:27 PM
Autofit Row Height MarkN Excel Discussion (Misc queries) 0 November 21st 05 03:38 AM
autofit does not autofit rreneerob Excel Discussion (Misc queries) 1 October 17th 05 05:55 PM
Row Autofit Problem Peter Graff Excel Discussion (Misc queries) 3 January 18th 05 10:10 PM


All times are GMT +1. The time now is 07:36 PM.

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"