Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get Excel column width to be fixed

Status
Not open for further replies.

djgolds

Technical User
Dec 11, 2000
23
US
I've created a PivotTable and below that I've entered formulas for percentages based on the calculations in the PivotTable. Every time I change my selection in the Pivot table, it reduces the column widths so that it's not wide enough for the calculations I've entered in below. Any suggestions on how to make it stay at a fixed width?

Thanks!
 
One would expect that if you "fix" the column widths to a specific width - i.e. by right-clicking on the column letter, choosing "Column Width" and entering a number - then that width should remain fixed.

However, if that doesn't work, here's a VBA example routine that you can use. Of coure modify it to include the specific columns and widths you require.

Sub Set_ColumnWidths()
Columns("A:A").EntireColumn.ColumnWidth = 12
Columns("C:C").EntireColumn.ColumnWidth = 12
Columns("E:E").EntireColumn.ColumnWidth = 12
End Sub

I hope this helps. :) Please advise as to how you make out.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
To keep column widths unchanged while changing/refreshing, select "Table options..." from pivot table menu and deselect "Autoformat table" on "Pivot table options" displayed dialog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top