PC Review


Reply
Thread Tools Rate Thread

Complex Pivot table formatting

 
 
=?Utf-8?B?a2x5c2VsbA==?=
Guest
Posts: n/a
 
      25th Jul 2007
Hi,

I have six pivot tables all chained together on a sheet. Since Excel doesn't
do a good job remembering all the custom formatting that you do to it before
a refresh, I need macros to do the formatting afterwards. Is there is any way
to do this by referring to the different parts and then applying your desired
formatting via code? I'm having a heck of at time decreasing line thickness
between groupings, etc. Since these grouping will change each time the pivot
tables are generated due to new data being populated, I can't create a
standard name reference that will consistently refer to the area that I'd
like to format.

To complicate matters, each group of six pivot table contained on a
worksheet will have a sheet name equal to the page filter chosen on a summary
sheet. Naming references becomes difficult because I won't know the sheet
name where the six pivot tables are located until the user enters in a
pagefilter on the summary sheet and VBA subsequently generates the worksheet
with the six pivot tables (all with the same page filter).

Is this a question of WYSIWYG? What a drag if this is the case. How the
tables are generated is very crude and clients won't find them useful due to
the many busy dark lines between data groupings...

Can anyone provide some insight into matter?

Thanks a million...
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmxhZG8gU3ZlZGE=?=
Guest
Posts: n/a
 
      25th Jul 2007
I'm usually using "Excel predefined formats" combine with my own formats. I
do it this way:

Sub FormatPivotTable(sh As Worksheet)

sh.PivotTables(1).Format xlReport6
sh.Columns("A:A").WrapText = True
sh.Columns("A:A").ColumnWidth = 9
sh.Columns("B").ColumnWidth = 5
sh.Columns("E:E").ColumnWidth = 60
sh.Columns("F:G").ColumnWidth = 9
sh.Columns("H:H").ColumnWidth = 13
sh.Cells.EntireRow.AutoFit
sh.Rows("1:4").RowHeight = 0

End Sub

Vlado


"klysell" wrote:

> Hi,
>
> I have six pivot tables all chained together on a sheet. Since Excel doesn't
> do a good job remembering all the custom formatting that you do to it before
> a refresh, I need macros to do the formatting afterwards. Is there is any way
> to do this by referring to the different parts and then applying your desired
> formatting via code? I'm having a heck of at time decreasing line thickness
> between groupings, etc. Since these grouping will change each time the pivot
> tables are generated due to new data being populated, I can't create a
> standard name reference that will consistently refer to the area that I'd
> like to format.
>
> To complicate matters, each group of six pivot table contained on a
> worksheet will have a sheet name equal to the page filter chosen on a summary
> sheet. Naming references becomes difficult because I won't know the sheet
> name where the six pivot tables are located until the user enters in a
> pagefilter on the summary sheet and VBA subsequently generates the worksheet
> with the six pivot tables (all with the same page filter).
>
> Is this a question of WYSIWYG? What a drag if this is the case. How the
> tables are generated is very crude and clients won't find them useful due to
> the many busy dark lines between data groupings...
>
> Can anyone provide some insight into matter?
>
> Thanks a million...
> --
> Kent Lysell
> Financial Consultant
> Ottawa, Ontario
> W: 613.948-9557

 
Reply With Quote
 
=?Utf-8?B?a2x5c2VsbA==?=
Guest
Posts: n/a
 
      25th Jul 2007
Thanks Vlado.

I appreciate your input. Every bit of help has helped me with my general
direction.
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557


"Vlado Sveda" wrote:

> I'm usually using "Excel predefined formats" combine with my own formats. I
> do it this way:
>
> Sub FormatPivotTable(sh As Worksheet)
>
> sh.PivotTables(1).Format xlReport6
> sh.Columns("A:A").WrapText = True
> sh.Columns("A:A").ColumnWidth = 9
> sh.Columns("B").ColumnWidth = 5
> sh.Columns("E:E").ColumnWidth = 60
> sh.Columns("F:G").ColumnWidth = 9
> sh.Columns("H:H").ColumnWidth = 13
> sh.Cells.EntireRow.AutoFit
> sh.Rows("1:4").RowHeight = 0
>
> End Sub
>
> Vlado
>
>
> "klysell" wrote:
>
> > Hi,
> >
> > I have six pivot tables all chained together on a sheet. Since Excel doesn't
> > do a good job remembering all the custom formatting that you do to it before
> > a refresh, I need macros to do the formatting afterwards. Is there is any way
> > to do this by referring to the different parts and then applying your desired
> > formatting via code? I'm having a heck of at time decreasing line thickness
> > between groupings, etc. Since these grouping will change each time the pivot
> > tables are generated due to new data being populated, I can't create a
> > standard name reference that will consistently refer to the area that I'd
> > like to format.
> >
> > To complicate matters, each group of six pivot table contained on a
> > worksheet will have a sheet name equal to the page filter chosen on a summary
> > sheet. Naming references becomes difficult because I won't know the sheet
> > name where the six pivot tables are located until the user enters in a
> > pagefilter on the summary sheet and VBA subsequently generates the worksheet
> > with the six pivot tables (all with the same page filter).
> >
> > Is this a question of WYSIWYG? What a drag if this is the case. How the
> > tables are generated is very crude and clients won't find them useful due to
> > the many busy dark lines between data groupings...
> >
> > Can anyone provide some insight into matter?
> >
> > Thanks a million...
> > --
> > Kent Lysell
> > Financial Consultant
> > Ottawa, Ontario
> > W: 613.948-9557

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex Pivot Table Function DyingIsis Microsoft Excel Misc 1 23rd May 2008 12:50 AM
Complex Pivot Table =?Utf-8?B?U3VraA==?= Microsoft Excel Misc 3 2nd Mar 2007 01:50 PM
Pivot Table border formatting and pivot chart formatting cailotto@sbcglobal.net Microsoft Excel Misc 0 22nd Jul 2005 02:22 PM
Complex pivot table - 13 row fields psalmon Microsoft Excel Misc 0 20th Mar 2004 12:06 AM
Pivot Table: Complex printing issue???? =?Utf-8?B?Sm9lIE1hdGhpcw==?= Microsoft Excel Programming 1 21st Nov 2003 05:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 PM.