# Widening Multiple Columns Proportionally

by Allen Wyatt
(last updated August 12, 2021)

Keith has a worksheet that uses columns A through H. He would like to be able to widen each column by a proportional amount. For instance, if he selects all 8 columns, it would be great if he could grab the right edge of column H and as he drags right, all of the columns would be proportionally spaced out. He wonders if there is a way to do this type of column widening.

To better understand what Keith is talking about, perhaps an example is in order. The normal way of adjusting column width using the mouse is to select the columns and then drag a divider between the column headers to the right or left. Let's say that column A's width is 5, column B is 10, and column C is 15. If you select A:C and drag the divider at the right side of the column C header to 20, that is an increase of 33% for column C. Ideally, both column A and B would also be resized by 33% (as Keith desires), but they are, instead, both set to a width of 20 to match column C.

Further, holding down a modifier key (Ctrl, Alt, or Shift) as you drag the mouse has no effect; the column widths are still all set equal to each other. If you try to right-click and drag, that does nothing except display a Context menu. Thus, from all the testing we've been able to do, there is no way to proportionally adjust column widths in in Excel that we've been able to discover.

Perhaps the easiest way is to use a macro to adjust the column widths. The following is a good example of such an approach.

```Sub ProportionalWidth()
Dim C As Range
Dim sRaw As String
Dim sTemp As String
Dim P As Single

sRaw = InputBox("Increase width by how what % (0 to 100)?")
P = Val(sRaw)
If P >= 0 And P <= 100 Then
P = 1 + (P / 100)
sTemp = ""
For Each C In Selection.Columns
sTemp = sTemp & "Column " & ColumnLetter(C.Column)
sTemp = sTemp & ": " & C.ColumnWidth & " ==> "
C.ColumnWidth = C.ColumnWidth * P
sTemp = sTemp & C.ColumnWidth & vbCrLf
Next C
MsgBox sTemp
Else
End If
End Sub
```
```Function ColumnLetter(Col As Long) As String
Dim Arr
Arr = Split(Cells(1, Col).Address(True, False), "\$")
ColumnLetter = Arr(0)
End Function
```

There are actually two macros in this example. The first (ProportionalWidth) changes the width of whatever columns you've selected. The second (ColumnLetter) is used to convert a numeric column number into the column letters. It is only used in putting together the report (in sTemp) of the before and after widths of the columns.

When you select columns and run the macro, it prompts you for how much wider you want to make those columns. Enter a number between 0 and 100, click OK, and the columns are widened by that percentage. In addition, you'll see a message box that shows the original width of each column and the adjusted width.

Note that this macro only widens columns. If you wanted use it to also make columns proportionally narrower, you would need to modify it to, perhaps, handle negative values.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13429) applies to Microsoft Excel 2007, 2010, 2013, and 2016.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Rotating a Page of Text

Beginning with Word 2000, you can rotate a page of text by using the Far East language support built into Word. This tip ...

Discover More

Word is often used to write all sorts of letters. You may want to create a template that makes creating your letters ...

Discover More

Frequent Workbook Recovery Prompts

When you open a workbook, Excel examines that workbook to make sure it can understand the data it contains. This can lead ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

##### More ExcelTips (ribbon)

Sizing Columns and Rows Using the Keyboard

Are you a keyboard-only user wondering how you can set column width or row height without using the mouse? This tip ...

Discover More

Hiding Columns Based on a Cell Value

Need to hide a given column based on the value in a particular cell? The easiest way to accomplish the task is to use a ...

Discover More

Unhiding a Limited Number of Columns

If you have a bunch of hidden columns in your worksheet, you might want to unhide only a portion of those columns. This ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 9?

2022-03-14 15:44:00

J. Woolley

My Excel Toolbox includes the AdjustColumnWidths macro to adjust the width of selected columns by a fixed increment or a proportional multiplier. The AdjustRowHeights macro will adjust the height of selected rows in the same way. Both macros support Undo (Ctrl+Z).

2022-03-08 22:28:45

Julie

This method assumes all cells have same font size...

- increase font size of all cells (experiment with values)
- AutoFit all columns
- restore font size

Respects the need for proportional spacing and easy to revert.
Method also works for proportional row heights.

2016-04-16 06:50:06

Sally

Using the column headers, if you select a range of columns and double click the header divider between any of the selected columns, they will adjust proportionately to the contents of each column. For this, no macro is necessary.

2016-02-06 13:00:33

Willy Vanhaelen

This single macro does perecentages > 100 as well as negative % to narrow colmums:

Sub ProportionalWidth()
Dim C As Range, Dim sTemp As String, Dim P As Single
On Error GoTo notOK
P = InputBox("Enter % to increase/decrease width")
P = 1 + (P / 100)
For Each C In Selection.Columns
sTemp = sTemp & "Column " & Split(Cells(1, C.Column).Address, "\$")(1)
sTemp = sTemp & ": " & C.ColumnWidth & " ==> "
C.ColumnWidth = C.ColumnWidth * P
sTemp = sTemp & C.ColumnWidth & vbCrLf
Next C
MsgBox sTemp
Exit Sub
notOK:
End Sub

2016-02-06 08:25:02

Michael (Micky) Avidan

@Sally Duncan,
The tip refers to "Widening Multiple Columns Proportionally(!!!) AND NOT
"Optimal width for the contents of cells".
*** This was the original request/question from a user named: Keith.
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
ISRAEL

2016-02-06 06:08:21

Gerhard Schweizer

Why limit the maximum to 100? Formula should also work for percentages >100

2016-02-06 05:03:46

Sally Duncan

There is also a very simple way to optimise column widths.
Using the column headers and (if necessary) the CTRL key, select the columns you wish to adjust. Move the mouse pointer over the border between any two of these column headers and double click. Each selected column adjusts to the optimal width for the contents. In my experience, adjusting each by a given value in a macro is less often necessary.

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.