Hi,
I am wanting to use getpivotdata to take the value from a pivot table for use in my main worksheet. I have managed to get that to work.
What I am struggling with is I was to be able to use a value in cell (C5) for the year YY ie 16 on the sheet that formula is on. I have tried to reference the cell in the formulae but seem to get #ref
Please find my code below... thanks
I am wanting to use getpivotdata to take the value from a pivot table for use in my main worksheet. I have managed to get that to work.
What I am struggling with is I was to be able to use a value in cell (C5) for the year YY ie 16 on the sheet that formula is on. I have tried to reference the cell in the formulae but seem to get #ref
Please find my code below... thanks

Code:
=GETPIVOTDATA("journal_amount",'Pivot Table'!$A$3,"nlyear", 'P&L'!C5,"trans_period","01","account_code","1211")