Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default freeze width of a column used by pivot table

Hi,

i'm using a pivot table report and want to fix the length of columns used in
that pivot table. is there any way to fix the width. i.e. when i refresh the
table, width of the columns should not increase. i dont need to show the full
contents of the text in those columns.

thanks,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default freeze width of a column used by pivot table

hi
freezing the columns so that they cannot be change may not be possible but
you might be able to use the worksheet change event to reset the columns to a
preset width so that when any change on the sheet occurs, the columns reset.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("E:E").ColumnWidth = 18
Columns("F:F").ColumnWidth = 14
End Sub

you did not mention specific column or widths so you might use this code as
an example, adding your columns and playing with the widths until they are to
your liking.

Regards
FSt1

"Atiq" wrote:

Hi,

i'm using a pivot table report and want to fix the length of columns used in
that pivot table. is there any way to fix the width. i.e. when i refresh the
table, width of the columns should not increase. i dont need to show the full
contents of the text in those columns.

thanks,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default freeze width of a column used by pivot table

hi
forgot to mention.
this is sheet code so it does not go into a standard module.
right click the sheet tab then click view code from the popup. paste there.

regards
FSt1

"FSt1" wrote:

hi
freezing the columns so that they cannot be change may not be possible but
you might be able to use the worksheet change event to reset the columns to a
preset width so that when any change on the sheet occurs, the columns reset.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("E:E").ColumnWidth = 18
Columns("F:F").ColumnWidth = 14
End Sub

you did not mention specific column or widths so you might use this code as
an example, adding your columns and playing with the widths until they are to
your liking.

Regards
FSt1

"Atiq" wrote:

Hi,

i'm using a pivot table report and want to fix the length of columns used in
that pivot table. is there any way to fix the width. i.e. when i refresh the
table, width of the columns should not increase. i dont need to show the full
contents of the text in those columns.

thanks,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default freeze width of a column used by pivot table

On Jun 22, 6:30*pm, FSt1 wrote:
hi
forgot to mention.
this is sheet code so it does not go into a standard module.
right click the sheet tab then click view code from the popup. paste there.

regards
FSt1



"FSt1" wrote:
hi
freezing the columns so that they cannot be change may not be possible but
you might be able to use the worksheet change event to reset the columns to a
preset width so that when any change on the sheet occurs, the columns reset.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("E:E").ColumnWidth = 18
Columns("F:F").ColumnWidth = 14
End Sub


you did not mention specific column or widths so you might use this code as
an example, adding your columns and playing with the widths until they are to
your liking.


Regards
FSt1


"Atiq" wrote:


Hi,


i'm using a pivot table report and want to fix the length of columns used in
that pivot table. is there any way to fix the width. i.e. when i refresh the
table, width of the columns should not increase. i dont need to show the full
contents of the text in those columns.


thanks,- Hide quoted text -


- Show quoted text -


Try working with the pivot tables in SiSense http://www.sisense.com.
they are easier to use and can use excel as a data source
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default freeze width of a column used by pivot table

Thanks, it did work! appreicate that.

however, just to save time on refreshing rate, if have used your code under
"Worksheet_PivotTableUpdate" instead of "Worksheet_SelectionChange". i am
still experimenting and hopefully wont see any drawback of the change i've
made in the code.

thanks again.
Atiq Ahmed


"FSt1" wrote:

hi
forgot to mention.
this is sheet code so it does not go into a standard module.
right click the sheet tab then click view code from the popup. paste there.

regards
FSt1

"FSt1" wrote:

hi
freezing the columns so that they cannot be change may not be possible but
you might be able to use the worksheet change event to reset the columns to a
preset width so that when any change on the sheet occurs, the columns reset.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("E:E").ColumnWidth = 18
Columns("F:F").ColumnWidth = 14
End Sub

you did not mention specific column or widths so you might use this code as
an example, adding your columns and playing with the widths until they are to
your liking.

Regards
FSt1

"Atiq" wrote:

Hi,

i'm using a pivot table report and want to fix the length of columns used in
that pivot table. is there any way to fix the width. i.e. when i refresh the
table, width of the columns should not increase. i dont need to show the full
contents of the text in those columns.

thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save new column width settings in pivot table Dan Excel Discussion (Misc queries) 5 July 15th 08 03:07 PM
column width in autoformatted pivot table user3307 Excel Discussion (Misc queries) 5 April 2nd 08 10:28 PM
Format pivot table / column width mcarter Excel Worksheet Functions 2 April 2nd 08 03:10 PM
freeze column width in a pivot table Martha Navarro Excel Discussion (Misc queries) 2 August 5th 06 01:53 AM
Keeping column width in Excel pivot table? Polina Excel Discussion (Misc queries) 1 April 3rd 06 05:02 AM


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"