How to distribute Columns Evenly in Excel – 5 Methods

The sample dataset showcases players, age, and countries.

Space Columns Evenly in Excel


Method 1 – Distribute Columns Evenly Using the Format Option

Steps

  • Click the top icon at the left corner of the worksheet to select the entire worksheet.

Space Column Evenly Using Format Option

  • Go to the Home tab.
  • Select Format in Cells.

  • Click Column Width.

  • Enter a column width and click ‘OK’.

This is the output.

Space Column Evenly Using Format Option

Read More: How to Space out Cells in Excel


Method 2 – Double-Clicking the Column Heading

Steps

  • Select all the columns and press Shift.

  • Double-click a column headings. It’ll automatically adjust the width of all columns.

Space Column Evenly by Double Clicking Column Headings

This is the output.

Keyboard Shortcut

You can also select all the columns and press ‘Alt +H+O+I’.

Read More: How to Space Rows Evenly in Excel


Method 3 – Using the AutoFit Option

Steps

  • Select the entire dataset.

  • Go to the Home tab.
  • In Cells, click Format.

  • Click AutoFit Column Width.

Space Column Evenly Using AutoFit Option

This is the output.

Space Column Evenly Using AutoFit Option

Read More: How to Add Space Between Text in Excel Cell


Method 4 – Distribute Selected Columns Evenly

Steps

  • Select specific columns. Here, B4:B12.

  • Choose AutoFit Column Width in Format option or press ‘Alt+H+O+I’. It’ll change the column width of the selected column.

Space Columns Evenly for Selected Cells


Method 5 – Embedding VBA Codes

5.1 Set Columns to a Specific Size

Steps

  • Click Microsoft Excel Objects and select the sheet to apply the code. Here, ‘VBA1’.

  • Enter the following code. Here, column width is set to 16.
Sub makeequalsize_Column()

Selection.ColumnWidth = 16

 End Sub
  • Close the code window.
  • Go to the View tab and select Macros.

  • In the Macro box, select your Macro name and click Run.

This is the output.

Space Columns to a Specific Size


5.2  Make columns the Same width as a Specific Column

Steps

  • Go to the Developer tab.
  • Press Alt+F11.
  • Select a sheet to run the code in Microsoft Excel Objects.
  • Enter the following code.
Sub makeequalsize()

Selection.ColumnWidth = Columns("B").ColumnWidth

End Sub
  • Minimize the visual basic window and go to the View tab.
  • Select Macros.

  • Select your Macro Name and click Run.

This is the output.

Same Size as a Specific Column


5.3 Autofit Selected Columns

Steps

  • Open the Developer tab.
  • Press ‘Alt+F11’.
  • Select the sheet to apply the code.
  • Enter the following code in the code window.
Sub autofitColumns_Selection()

Selection.Columns.AutoFit

End Sub
  • Minimize the developer tab and go to the View tab.
  • Select Macros.

  • Select your Macro name and click Run.

This is the output.

AutoFit Selected Columns

Read More: How to Add Space between Numbers in Excel


Download Practice Workbook

Download the practice workbook


 

Related Articles


<< Go Back to Space in Excel | Text Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Durjoy Paul
Durjoy Paul

Durjoy Kumar, with a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, is a dedicated contributor to the ExcelDemy project. His substantial contributions include crafting numerous articles and demonstrating expertise in Excel and VBA. Durjoy adeptly automates Excel challenges using VBA macros, offering valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, SPSS, C, C++, C#, JavaScript, Python Web Scraping, Data Entry... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo