Hi guys, I've been programming for a while, but strangely never learned to use Pivot Tables. Recently I discovered how much work they can save me so I started using them. I'm still having trouble with the code though. Please take a look and tell me what I'm doing wrong:
invPTWs.Activate
Set fCell = Range("A2")
Set lCell = Range("A65536").End(xlUp).End(xlToRight)
Set invPTrng = Range(fCell, lCell)
compWs.Cells.Clear
compWs.Select
Range("A1").End(xlToRight).Offset(0, 1).Select
Selection.Value = "Forecast"
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Application.GetPivotData(invPTrng, "compWs.Cell(2,1) ATLANTIC")
Bookmarks