Hello,
I am very very new to creating macros. I'm trying to incorporate the Last Row function into my pivot table but I have no clue how to. The code I'm using is below. I am using Excel 2013.
Dim LR As Long
LR = ActiveSheet.Range("E:E").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Import Worksheet!R1C1:R1000C18", Version:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Table!R3C1", TableName:="PivotTable2" _
, DefaultVersion:=xlPivotTableVersion10
Thank you for any help
I am very very new to creating macros. I'm trying to incorporate the Last Row function into my pivot table but I have no clue how to. The code I'm using is below. I am using Excel 2013.
Dim LR As Long
LR = ActiveSheet.Range("E:E").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Import Worksheet!R1C1:R1000C18", Version:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Table!R3C1", TableName:="PivotTable2" _
, DefaultVersion:=xlPivotTableVersion10
Thank you for any help