Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Nou pe simpatie: LaraTaner 24 ani
 | Femeie 24 ani Prahova cauta Barbat 24 - 52 ani |
|
|
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
TRaPModerator
Postari: 960
|
|
Usually I choose Design - Report Layout - Do not repeat item labels.
But sometimes when I use formulas to work with data inside Pivot tables, I need "repeat item labels" enabled for just one field, not all.
The following macro is a toggle to show / hide item labels for the active cell field - click on a cell in the desired field and press the button in QAT.
Sub PIVOT_repeat_labels() Application.ScreenUpdating = False
pt = ActiveCell.PivotTable.Name fld = ActiveCell.PivotField.Name
If ActiveSheet.PivotTables(pt).PivotFields(fld).RepeatLabels = True Then ActiveSheet.PivotTables(pt).PivotFields(fld).RepeatLabels = False Else ActiveSheet.PivotTables(pt).PivotFields(fld).RepeatLabels = True End If
pt = "" fld = ""
Application.ScreenUpdating = True End Sub |
|
|
| |
|
| #2 |
|
|
To repeat all labels, you can use the following:
Sub PIVOT_repeat_ALL_labels() Application.ScreenUpdating = False PT = ActiveCell.PivotTable.Name ActiveSheet.PivotTables(PT).RepeatAllLabels xlRepeatLabels PT = "" Application.ScreenUpdating = True End Sub |
_______________________________________

|
|
| |
|