Forum Discussion
Column width
- Aug 23, 2020
tomc72 , as workaround, you can hide the headings by going to VIEW tab and unchecking the Headings under "Show" as shown in below image. Then on scrolling down, the columns won't shift to the right. But compromise is, you cannot see row numbers (1,2,3...)or column headers (A,B,C...).
Open an existing workbook or create a new, empty one.
The fastest way to get to the Microsoft Visual Basic Editor is via the shortcut
Press the key combination ALT F11.
Excel now shows the VBA editor or macro editor.
Select the MODULE command from the INSERT menu.
Excel displays a window in which you can type or copy the program code.
When you are ready. Close the VBA editor with the command FILE - CLOSE AND RETURN TO MICROSOFT EXCEL or the key combination ALT Q.
Some more infos:
Thx
Nikolino
Many thanks Nicolino. Are you able to tell me the code that will keep the row-number column at a fixed (wider than the default) width, please?
Tom
- amit_bholaAug 22, 2020Iron Contributor
tomc72 , also if you want that in all of your workbooks, the column width remains a fixed default value of your choice, then MS suggests setting up a template.
On this link
https://support.microsoft.com/en-us/office/customize-how-excel-starts-6509b9af-2cc8-4fb6-9ef5-cf5f1d292c19
scroll down to this topic :-
Automatically open a workbook template or worksheet template when you create a new workbook or worksheet
- tomc72Aug 22, 2020Brass Contributor
Thanks Amit.
I know how to adjust all the lettered columns, it´s the column that holds the built in row-numbering that I want to control i.e. the left of column A.
Tom W
- amit_bholaAug 23, 2020Iron Contributor
tomc72 , as workaround, you can hide the headings by going to VIEW tab and unchecking the Headings under "Show" as shown in below image. Then on scrolling down, the columns won't shift to the right. But compromise is, you cannot see row numbers (1,2,3...)or column headers (A,B,C...).
- NikolinoDEAug 20, 2020Platinum Contributor
Wie ich Ihnen schon gesendet habe, wenn sie feste Spaltenbreite möchten, sollten Sie den ersten VBA Code in Ihr Makro einschreiben, wobei Sie die breite je nach bereich ändern.
Sub Column_width() Sheets("Tabelle1").Activate Range("A1:A999").EntireColumn.ColumnWidth = 15
Range("A1000:A4500").EntireColumn.ColumnWidth = 25 End SubWeis auch nicht wie ich Ihnen weiterhelfen kann, eine Datei (ohne sensible daten) wäre von vorteil.
Danke,
Nikolino