Hello,
Thank you for teaching me what I know. Ha...It's not much but I've read threads and went through http://www.homeandlearn.org/. I am brand new and hooked.

I was able to create a very simple code and have to push a Macro button to run it. Instead, I would like to have it automatically run when I make a different selection on a Slicer.

Here is my code:


-----
Private Sub Worksheet_PivotTableUpdate()

Dim TotalLines As Integer
TotalLines = Worksheets("Sheet1").Range("E:E").Cells.SpecialCells(xlCellTypeConstants).Count - 1
Dim NextLine As Integer
NextLine = 8

Range("F8:F1048576").Value = "" 'Clear Old Values
If TotalLines > 0 Then 'End If Nothing Returned
For X = 1 To TotalLines
Range("F" & NextLine).Value = Range("E" & NextLine) / Range("D" & NextLine)
NextLine = NextLine + 1
Next X
End If

End Sub
-----

Of course any programming tips for what I've made would be GREAT! But what I really want is to have this run automatically. Instead, I get an error that says "Compile error: Procedure declaration does not match description of event or procedure having the same name".