Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Problème de paramètre

2 réponses
Avatar
remige_paralogique
Bonjour, je r=E9alise un TCD et je voudrais changer via une variable le
chiffre 1365 dans l'expression ci-dessous, propre =E0 un TCD. Le but
=E9tant de s=E9lectionner l'int=E9gralit=E9 des lignes de ma feuille. Voici
le code:

ActiveWorkbook.PivotCaches.Add(SourceType:=3DxlDatabase, SourceData:=3D _
"'3-Ventil=E9s via PF'!R1C1:R1365C27").CreatePivotTable
TableDestination:=3D"", _
TableName:=3D"Tableau crois=E9 dynamique1", DefaultVersion:=3D _
xlPivotTableVersion10

Merci pour votre aide.

2 réponses

Avatar
AV
Ca pourrait avoir cette allure (non testé) :

Lx = Cells.Find("*", , 1, , 1, 2).Row

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'3-Ventilés via PF'!R1C1:R" &Lx &"C27").CreatePivotTable
TableDestination:="", _
TableName:="Tableau croisé dynamique1", DefaultVersion:= _
xlPivotTableVersion10

AV
Avatar
remige_paralogique
Merci.

Ca pourrait avoir cette allure (non testé) :

Lx = Cells.Find("*", , 1, , 1, 2).Row

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'3-Ventilés via PF'!R1C1:R" &Lx &"C27").CreatePivotTable
TableDestination:="", _
TableName:="Tableau croisé dynamique1", DefaultVersion:= _
xlPivotTableVersion10

AV