For some reason when i run the below macro the pivot table has stopped capturing all the information from the original source sheet. The Macro is below. I know this is the wrong forum for my question, but know one has responded.


Sub berINFO()
'
' berINFO Macro
' Macro recorded 18/07/2013 by ajn58q
'

'Application.Calculation = xlCalculationManual

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Brookstreet M.I'!R1C1:R979C18").CreatePivotTable TableDestination:="", _
TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
ActiveWorkbook.ShowPivotTableFieldList = True
ActiveSheet.PivotTables("PivotTable1").AddDataField ActiveSheet.PivotTables( _
"PivotTable1").PivotFields("Invoice Line Value"), "Sum of Invoice Line Value", _
xlSum
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Name")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Invoice No")
.Orientation = xlRowField
.Position = 2
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Item")
.Orientation = xlRowField
.Position = 3
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Order No")
.Orientation = xlRowField
.Position = 4
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Week Ending Date")
.Orientation = xlRowField
.Position = 5
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("JobTitle")
.Orientation = xlRowField
.Position = 6
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("StartDate")
.Orientation = xlRowField
.Position = 7
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Charge Rate")
.Orientation = xlRowField
.Position = 8
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Hours")
.Orientation = xlRowField
.Position = 9
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Comments")
.Orientation = xlRowField
.Position = 10
End With
ActiveWorkbook.ShowPivotTableFieldList = False
ActiveCell.Offset(2, 11).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=INDEX('Purchase Order Number'!C[-11],MATCH(C[-8],'Purchase Order Number'!C[-11],0))"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:A9630"), Type:= _
xlFillDefault
ActiveCell.Range("A1:A9630").Select
ActiveWindow.LargeScroll Down:=-17
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(C[-9],'Purchase Order Number'!C[-12]:'Purchase Order Number'!C[-7],6,FALSE)"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:A9630"), Type:= _
xlFillDefault
ActiveCell.Range("A1:A9630").Select
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(C[-10],'Purchase Order Number'!C[-13]:'Purchase Order Number'!C[-10],4,FALSE)"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:A9630"), Type:= _
xlFillDefault
ActiveCell.Range("A1:A9630").Select
ActiveCell.Offset(-1, 0).Range("A1").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveCell.Offset(-1, -2).Range("A1").Select
Selection.AutoFilter Field:=12, Criteria1:="<>#N/A", Operator:=xlAnd
Selection.AutoFilter Field:=13, Criteria1:="<>#N/A", Operator:=xlAnd
Selection.AutoFilter Field:=14, Criteria1:="<>#N/A", Operator:=xlAnd
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.EntireColumn.Hidden = True
ActiveCell.Offset(3, 1).Range("A1").Select
ActiveCell.Columns("A:A").EntireColumn.EntireColumn.AutoFit
ActiveCell.Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
ActiveCell.FormulaR1C1 = "Cluster"
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.Interior.ColorIndex = xlNone
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
ActiveCell.FormulaR1C1 = "BER"
ActiveCell.Offset(0, -1).Range("A1:B9451").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False




End Sub