[VBA-E]extraire des datas de PivotTable
Bonjour,
Comment puis je recuperer les valeur d'une pivot table pour les copier dans un autre tableau
exemple
pivot table
Assignement date
13/01 5
14/01 6
15/01 5
je voudrai recopier dans un autre tableau les differentes valeurs
date
13/01 14/01 15/01
valeur 5 6 5
Quelqu'un peut-il m'aider je dois le faire via le VBA Excel
Merci
J'ai trouvé queqlue chose du genre
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Set pvttable = Worksheets("DAILY View").Range("D1").PivotTable
For Each pvtitem In pvttable.PivotFields("I").PivotItems
rw = rw + 1
' copcol = copcol + 1
' MsgBox pvtitem.Name
' MsgBox pvtitem.Value
If pvtitem <> "0/1/1900" And pvtitem.Name <> "(blank)" Then
MsgBox pivot
copcol = copcol + 1
a = pvtitem.Name
Application.Worksheets("Sheet4").Cells(3, copcol).Value = pvttable.GetData("'Count of AHD_Id'" & a)
End If
Next |
Cela marche très bien mais je suis bloqué suis j'ai une pivote table du genre
Count of AHD_Id Type
DATEASSIGNED I R Grand Total
13/11/2006 68 29 97
14/11/2006 89 8 97
15/11/2006 64 15 79
16/11/2006 67 23 90
17/11/2006 521 21 542
18/11/2006 1 1
20/11/2006 42 2 44
Grand Total 852 98 950
je n'arrive pas a le traduire en un tableau du style
13/11/2006 14/11/2006
I 68 89
R 29 8
....