Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having trouble of counting the number of rows in PivotTable, I have
tried to use Worksheets("PivotTable").PivotTables("TimePivot"). PivotFields("Name").PivotItems.Count, but it does not necessarily give the correct answer, any suggestions, thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can count the rows in the tableranges, e.g.:
Dim pt As PivotTable Set pt = Worksheets("PivotTable").PivotTables("TimePivot") MsgBox pt.TableRange1.Rows.Count MsgBox pt.TableRange2.Rows.Count 'includes page area Desmond wrote: I am having trouble of counting the number of rows in PivotTable, I have tried to use Worksheets("PivotTable").PivotTables("TimePivot"). PivotFields("Name").PivotItems.Count, but it does not necessarily give the correct answer, any suggestions, thanks in advance! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are a star! Thank you very much!
"Debra Dalgleish" wrote: You can count the rows in the tableranges, e.g.: Dim pt As PivotTable Set pt = Worksheets("PivotTable").PivotTables("TimePivot") MsgBox pt.TableRange1.Rows.Count MsgBox pt.TableRange2.Rows.Count 'includes page area Desmond wrote: I am having trouble of counting the number of rows in PivotTable, I have tried to use Worksheets("PivotTable").PivotTables("TimePivot"). PivotFields("Name").PivotItems.Count, but it does not necessarily give the correct answer, any suggestions, thanks in advance! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotTable Row Count | Excel Discussion (Misc queries) | |||
Pivottable won't count blank values | Excel Discussion (Misc queries) | |||
Pivottable to count non-zeros | Excel Discussion (Misc queries) | |||
Why does my Excel pivottable uses count instead of sum | Excel Discussion (Misc queries) | |||
PivotTable - Count by Month | Excel Worksheet Functions |