Gingertrees
Well-known Member
- Joined
- Sep 21, 2009
- Messages
- 697
Hi,
I have a pivot-table built via VBA. I have a list of clients as a Row field, Dates of Service as a Column field, and Case Worker as a page field.
When the pivot table first opens, it displays the total number of clients in the E4 cell with the following formula:
This number of clients changes when I change from ALL Case Workers to just one. So I could have 100 clients in total, but Case Worker John only has 25.
How can I update that Counta field when I change the case worker?
I have a pivot-table built via VBA. I have a list of clients as a Row field, Dates of Service as a Column field, and Case Worker as a page field.
When the pivot table first opens, it displays the total number of clients in the E4 cell with the following formula:
Code:
Dim Abba As Long
Abba = Application.WorksheetFunction.CountA(Range("A1:A1000"))
'counts clients served; the minus 7 is so it doesn't count the
header and total cells
Range("E4") = Abba - 7
This number of clients changes when I change from ALL Case Workers to just one. So I could have 100 clients in total, but Case Worker John only has 25.
How can I update that Counta field when I change the case worker?