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 |
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 |
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 |
All times are GMT +1. The time now is 05:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com