G
Guest
I recently posted a question about "...how to use a macro to alter a Pivot
Tabel". Debrah gave me a sollution which worked perfectly :-D
Though I wanted more... I tried to alter two Pivot Tables at the same time.
And it worked splenditly! :-D
Thus I wanted to extend the borders. Can Anybody tell me wheter it is
possible to make a Macro which alters the Pivot tables ONLY if the exact
match is made with the data of the Pivot Table and the data filled in in the
reference cell.
The problem is that I use two different databases to fill two different
pivot tables; the one thing that connexts them are the "ARF numbers". It
happens that there is data about the ARF in only one of the two databases.
Right now I use this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$20" Then
Sheets("INFO Dbase Uren").PivotTables("INFO Dbase Uren") _
.PivotFields("ARF No.").CurrentPage = Target.Value
Sheets("INFO DBase Materiaal Kosten").PivotTables("INFO DBase Materiaal
Kosten") _
.PivotFields("Reference.").CurrentPage = Target.Value
End If
End Sub
Concrete Question: "If one of the Databases does not contain the requested
Data; can it set the Pivot Table connected to that Database to "Blank"?
I hope you can help! Thanks in Advance!
Tabel". Debrah gave me a sollution which worked perfectly :-D
Though I wanted more... I tried to alter two Pivot Tables at the same time.
And it worked splenditly! :-D
Thus I wanted to extend the borders. Can Anybody tell me wheter it is
possible to make a Macro which alters the Pivot tables ONLY if the exact
match is made with the data of the Pivot Table and the data filled in in the
reference cell.
The problem is that I use two different databases to fill two different
pivot tables; the one thing that connexts them are the "ARF numbers". It
happens that there is data about the ARF in only one of the two databases.
Right now I use this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$20" Then
Sheets("INFO Dbase Uren").PivotTables("INFO Dbase Uren") _
.PivotFields("ARF No.").CurrentPage = Target.Value
Sheets("INFO DBase Materiaal Kosten").PivotTables("INFO DBase Materiaal
Kosten") _
.PivotFields("Reference.").CurrentPage = Target.Value
End If
End Sub
Concrete Question: "If one of the Databases does not contain the requested
Data; can it set the Pivot Table connected to that Database to "Blank"?
I hope you can help! Thanks in Advance!