Hi all,
I need some help with pivot tables.
I have Excel 2003 (at work) and I need to control a pivot table with VBA.
the columns are:
- Projects (projectnames, text)
- Date (date range)
- Employee (name)
- m2 (between 50 and 5000)
The rows are:
- Elementcodes
The filters created in a userform are:
How could I control the different elements in VBA?
I am known with this:
But how can I use this for a date range? and for m2 filtering?
Apart from this I have a issue with summing the data, I need a sum of every project. This is easy. But I also need a average over all projects. Can this be achieved?
Any help is welcome!
Mathijs
I need some help with pivot tables.
I have Excel 2003 (at work) and I need to control a pivot table with VBA.
the columns are:
- Projects (projectnames, text)
- Date (date range)
- Employee (name)
- m2 (between 50 and 5000)
The rows are:
- Elementcodes
The filters created in a userform are:
How could I control the different elements in VBA?
I am known with this:
Code:
With ActiveSheet.PivotTables("Draaitabel1").PivotFields("ELEMENTKD")
.PivotItems("11").Visible = False
.PivotItems("13").Visible = False
.PivotItems("16").Visible = False
.PivotItems("21").Visible = False
End With
Apart from this I have a issue with summing the data, I need a sum of every project. This is easy. But I also need a average over all projects. Can this be achieved?
Any help is welcome!
Mathijs