emad_mesalmy
New Member
- Joined
- Jan 4, 2018
- Messages
- 2
Greetings, How can i change below code to be dynamic range?
Sub Pivot_Data()
'
' Pivot_Data Macro
'
'
Range("A1").Select
Selection.CurrentRegion.Select
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R34093C8", Version:=6).CreatePivotTable TableDestination:= _
"Sheet1!R1C12", TableName:="PivotTable2", DefaultVersion:=6
Sub Pivot_Data()
'
' Pivot_Data Macro
'
'
Range("A1").Select
Selection.CurrentRegion.Select
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R34093C8", Version:=6).CreatePivotTable TableDestination:= _
"Sheet1!R1C12", TableName:="PivotTable2", DefaultVersion:=6