Forum Discussion

dolfinmagikpro's avatar
dolfinmagikpro
Copper Contributor
Sep 25, 2025

Column width after Column Insert

Greetings.

Is there a way to insert a column between two columns and have the column widths adjust automatically?

For instance, Column A is 20 wide and Column B is 60 wide and Column C is 30 wide.  If I insert a new column between A & B, I want the New column to be the default width, the new Column C (which was B) to maintain its width of 60, not change to 30.

In other words, is there a way to have column widths shift with their columns?

1 Reply

  • How about automating

    Sub InsertColumnPreserveWidth()
        Dim colIndex As Integer
        colIndex = ActiveCell.Column
    
        Dim originalWidth As Double
        originalWidth = Columns(colIndex + 1).ColumnWidth
    
        Columns(colIndex + 1).Insert Shift:=xlToRight
        Columns(colIndex + 2).ColumnWidth = originalWidth
    End Sub

    by VBA:

     

     

Resources