#1   Report Post  
Posted to microsoft.public.excel.misc
KB KB is offline
external usenet poster
 
Posts: 41
Default Cell Width

I need cells to automatically adjust to fit text entered.
This text will be entered by others after I complete the workbook.

Thanks for your help!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Cell Width

FormatColumnAutofit Selection for width.

FormatRowAutofit for height.

Note you can also turn on wordwrap.

Entire rows and entire columns will adjust.

You cannot adjust individual cells.


Gord Dibben MS Excel MVP

On Thu, 1 Jan 2009 15:41:00 -0800, KB wrote:

I need cells to automatically adjust to fit text entered.
This text will be entered by others after I complete the workbook.

Thanks for your help!


  #3   Report Post  
Posted to microsoft.public.excel.misc
KB KB is offline
external usenet poster
 
Posts: 41
Default Cell Width

I tried it and it adjusted the column width to what is already on the
worksheet, but did not adjust as I entered in new information.

"Gord Dibben" wrote:

FormatColumnAutofit Selection for width.

FormatRowAutofit for height.

Note you can also turn on wordwrap.

Entire rows and entire columns will adjust.

You cannot adjust individual cells.


Gord Dibben MS Excel MVP

On Thu, 1 Jan 2009 15:41:00 -0800, KB wrote:

I need cells to automatically adjust to fit text entered.
This text will be entered by others after I complete the workbook.

Thanks for your help!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Cell Width

hi
see this site..
http://www.mrexcel.com/archive/VBA/522.html

it explains how to set up a worksheet change event to autofit the activecell
on enter. complete with code.

Regards
FSt1

"KB" wrote:

I need cells to automatically adjust to fit text entered.
This text will be entered by others after I complete the workbook.

Thanks for your help!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Cell Width

Are you talking about this functionality for every cell on the worksheet? If
so, right click the tab at the bottom of the worksheet, select View Code
from the popup menu and copy paste the code below into the code window that
appeared...

'************* START OF CODE *************
Dim LastColumn As Long

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If LastColumn 0 Then
Application.ScreenUpdating = False
Columns(LastColumn).AutoFit
Application.ScreenUpdating = True
End If
LastColumn = Target.Column
End Sub
'************* END OF CODE *************

If you do not want this functionality for the whole sheet, then tell us for
what cells you do want it for.

--
Rick (MVP - Excel)


"KB" wrote in message
...
I tried it and it adjusted the column width to what is already on the
worksheet, but did not adjust as I entered in new information.

"Gord Dibben" wrote:

FormatColumnAutofit Selection for width.

FormatRowAutofit for height.

Note you can also turn on wordwrap.

Entire rows and entire columns will adjust.

You cannot adjust individual cells.


Gord Dibben MS Excel MVP

On Thu, 1 Jan 2009 15:41:00 -0800, KB
wrote:

I need cells to automatically adjust to fit text entered.
This text will be entered by others after I complete the workbook.

Thanks for your help!




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
Cell Underline problem underlines across width of cell tshoop7 Excel Worksheet Functions 1 July 24th 08 12:18 AM
ASC() does not convert full-width to half-width letters (Exel 2003 DY Excel Worksheet Functions 0 January 27th 07 01:34 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Same column, different cell width at different row Glenn Chung Excel Discussion (Misc queries) 3 June 7th 05 09:58 AM
Excel Cell Width JeffW Excel Discussion (Misc queries) 4 January 16th 05 02:50 AM


All times are GMT +1. The time now is 07:03 AM.

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

About Us

"It's about Microsoft Excel"