keep the column width constant after a pivot table update

Sanj

New Member
Joined
Jan 8, 2004
Messages
4
I am using Excel 2000, on Windows 2000 professional operating system.

In my excel sheet i have a large pivot table, but after i refresh the data in the pivot table the first column(column A, which just shows the names of different regions in the world) shrinks in size and the text is not readable.
I have to then manually re-size the column each time which is a pain, since i refresh the pivot tables several times a day.

Is there some way i can keep the column width constant after an pivot table update??
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

j844929

Active Member
Joined
Aug 18, 2002
Messages
423
Re: keep the column width constant after a pivot table updat

Say, for example, you wanted to set the width of column A in sheet1 to 25 after updating, just add the following on to the end of your code:


Worksheets("Sheet1").Columns(1).ColumnWidth = 25


Hope this helps.

Tim
 

Sanj

New Member
Joined
Jan 8, 2004
Messages
4
Re: keep the column width constant after a pivot table updat

Thanks for that.

But that will affect the width of the column right down the excel sheet....am i right?

The problem i will have then, is the data i have furhter down the sheet in column A will also change in size.
I actually only want to have a fixed column lenght for the data in say cells A10 through to A25. Any suggestions on how i can do this??
 

j844929

Active Member
Joined
Aug 18, 2002
Messages
423
Re: keep the column width constant after a pivot table updat

As far as I know, the only way to do that would be to add another column next to it and put the information further down the page into the new columumn, and then merge cells in the two columns for the range that needs to be wider, then you might not need the code that I gave you originally. Other than that, stumped, pretty much...

Hopefully someone will correct me if I'm wrong, but you can set the width of a column for only certain rows...
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,096
Messages
5,768,061
Members
425,451
Latest member
JohnBrooksBiddle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top