Amazon VBA Uživatelský manuál Strana 45

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 60
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 44
275
Using Advanced Pivot Table Techniques
WSR.Cells(LastRow, 1).Value = “Top 5 Total”
‘ Do some basic formatting
‘ Autofit columns, bold the headings, right-align
WSR.Range(WSR.Range(“A2”), WSR.Cells(LastRow, 8)).Columns.AutoFit
Range(“A3”).EntireRow.Font.Bold = True
Range(“A3”).EntireRow.HorizontalAlignment = xlRight
Range(“A3”).HorizontalAlignment = xlLeft
Range(“B3”).Value = “Revenue”
Range(“A2”).Select
Next PivItem
‘ Clear the pivot table
PT.TableRange2.Clear
Set PTCache = Nothing
MsgBox Ctr & “ Region reports have been created”
End Sub
Manually Filtering Two or More Items in a PivotField
In addition to setting up a calculated pivot item to display the total of a couple of products
that make up a dimension, you can manually filter a particular PivotField.
For example, you have one client who sells shoes. In the report showing sales of sandals, he
wants to see just the stores that are in warm-weather states. The code to hide a particular
store is
PT.PivotFields(“Store”).PivotItems(“Minneapolis”).Visible = False
You need to be very careful never to set all items to False; otherwise, the macro ends with
an error. This tends to happen more than you would expect. An application may first show
products A and B and then on the next loop show products C and D. If you attempt to make
A and B not visible before making C and D visible, no products will be visible along the
PivotField, which causes an error. To correct this, always loop through all PivotItems, mak-
ing sure to turn them back to visible before the second pass through the loop.
This process is easy in VBA. After building the table with
Product in the page field, loop
through to change the
Visible property to show only the total of certain products:
‘ Make sure all PivotItems along line are visible
For Each PivItem In _
PT.PivotFields(“Product”).PivotItems
PivItem.Visible = True
Next PivItem
‘ Now - loop through and keep only certain items visible
For Each PivItem In _
PT.PivotFields(“Product”).PivotItems
Select Case PivItem.Name
Case “Landscaping/Grounds Care”, _
“Green Plants and Foliage Care”
11
12_0789736012_CH11.qxd 12/11/06 6:26 PM Page 275
Zobrazit stránku 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 59 60

Komentáře k této Příručce

Žádné komentáře

Electrolux UFFLEXA podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Odkurzacze Electrolux UFFLEXA.
Dostarczamy 2 pdf podręczników Electrolux UFFLEXA do pobrania za darmo według typów dokumentów: Instrukcja Użytkownika






Więcej produktów i instrukcji dla Odkurzacze Electrolux

Modele Rodzaj dokumentu
Z 2305 Instrukcja Użytkownika   Electrolux Z 2305 User Manual, 10 strony
Z4520T Instrukcja Użytkownika   Electrolux Z4520T User Manual, 5 strony
ZSPCSILENT Instrukcja Użytkownika       Electrolux ZSPCPARKET دليل الاستخدام [en] , 16 strony
UFORIGIN Instrukcja Użytkownika      Electrolux UFORIGIN دليل الاستخدام [en] , 92 strony
ZUSG4062 Instrukcja Użytkownika    Electrolux ZUSG4062 用户手册 [nl] , 36 strony
ZB3105 Instrukcja Użytkownika   Electrolux ZB3214G دليل الاستخدام, 28 strony
ZUS3960 Instrukcja Użytkownika     Electrolux ZUS3940P 用户手册, 56 strony
UMORIGIN Instrukcja Użytkownika        Electrolux UMORIGIN Korisnički priručnik [sv] , 76 strony
ZE340B Instrukcja Użytkownika       Electrolux ZE311G Ръководство за употреба, 6 strony
EL3000A Instrukcja Użytkownika     Electrolux EL3000A User Manual, 24 strony
ZUP3815 Instrukcja Użytkownika     Electrolux ZUP3815 Brugermanual, 92 strony
ZUA3840 Instrukcja Użytkownika     Electrolux ZUA3840 Brugermanual [en] , 92 strony
ZB5012 Instrukcja Użytkownika    Electrolux ZB5012 Ръководство за употреба [sv] , 108 strony
ZUSG3901 Instrukcja Użytkownika     Electrolux ZUSG3901 用户手册, 60 strony
ZUP3860CA Instrukcja Użytkownika     Electrolux ZUP3820RT Brugermanual, 92 strony
APORIGIN Instrukcja Użytkownika       Electrolux APORIGIN Ръководство за употреба, 72 strony
ZUSG3901 Instrukcja Użytkownika       Electrolux ZUSG3901 Brugermanual, 96 strony
ZAPORIGINE Instrukcja Użytkownika       Electrolux ZAPORIGINW دليل الاستخدام [es] [pt] , 72 strony
EUS8X2DB Instrukcja Użytkownika      Electrolux EUS8X3CB دليل الاستخدام, 96 strony
ZB3005 Instrukcja Użytkownika       Electrolux ZB3005 Ръководство за употреба, 84 strony