Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MatthewTap
 
Posts: n/a
Default Macro for resizing of columns?

Is it possible to use a macro that will resize the columns?

What I mean by this is basically I want a macro that can act as if the
divider between column A and column B was double clicked, thus resizing
Column A to the size of the largest cell in the column.

Is this possible? If so, anyone able to help me out?

Any help would be greatly appreciated.

Thanks.
Matt
  #2   Report Post  
Posted to microsoft.public.excel.misc
Paul Sheppard
 
Posts: n/a
Default Macro for resizing of columns?


MatthewTap Wrote:
Is it possible to use a macro that will resize the columns?

What I mean by this is basically I want a macro that can act as if the
divider between column A and column B was double clicked, thus
resizing
Column A to the size of the largest cell in the column.

Is this possible? If so, anyone able to help me out?

Any help would be greatly appreciated.

Thanks.
Matt


Hi Matt

Try this

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 01/12/2005 by
'

'
Cells.Select
Selection.Columns.AutoFit
Range("A1").Select
End Sub


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=489889

  #3   Report Post  
Posted to microsoft.public.excel.misc
MatthewTap
 
Posts: n/a
Default Macro for resizing of columns?

Thanks... that worked out.

Much appreciated.

"Paul Sheppard" wrote:


MatthewTap Wrote:
Is it possible to use a macro that will resize the columns?

What I mean by this is basically I want a macro that can act as if the
divider between column A and column B was double clicked, thus
resizing
Column A to the size of the largest cell in the column.

Is this possible? If so, anyone able to help me out?

Any help would be greatly appreciated.

Thanks.
Matt


Hi Matt

Try this

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 01/12/2005 by
'

'
Cells.Select
Selection.Columns.AutoFit
Range("A1").Select
End Sub


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=489889


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
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM


All times are GMT +1. The time now is 09:54 PM.

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"