=OFFSET(Sheet1!$A$1,COUNTA(Sheet1!$A:$A)-12,0,12,1)
Not sure how to incorporate that. The recorded macro looks like this:
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Data].[Month].[Month]" _
).VisibleItemsList = Array("[Data].[Month].&[yr2018mth08]", _
"[Data].[Month].&[yr2018mth09]", "[Data].[Month].&[yr2018mth10]", _
"[Data].[Month].&[yr2018mth11]", "[Data].[Month].&[yr2018mth12]", _
"[Data].[Month].&[yr2019mth01]", "[Data].[Month].&[yr2019mth02]", _
"[Data].[Month].&[yr2019mth03]", "[Data].[Month].&[yr2019mth04]", _
"[Data].[Month].&[yr2019mth05]", "[Data].[Month].&[yr2019mth06]", _
"[Data].[Month].&[yr2019mth07]")
Only issue is, this will continually roll or update.
Sub nguerra()
Dim Q As String: Q = Chr(34)
Dim Mth As Long, Yr As Long, r As Long, ws As Worksheet, [COLOR=#ff0000]VSL[/COLOR] As String
Set ws = Sheets("Strings")
[I][COLOR=#006400]'ask user and write to sheet[/COLOR][/I]
Yr = InputBox("Year ?", "Which Year", 2019)
Mth = InputBox("Month", "Which Month", 7)
ws.Range("A2:B2") = Array(Mth, Yr)
[COLOR=#006400][I]'create array string[/I][/COLOR]
VSL = Q & ws.Cells(13, 4) & Q
For r = 12 To 2 Step -1
[COLOR=#ff0000]VSL[/COLOR] = VSL & "," & Q & ws.Cells(r, 4) & Q
Next r
[COLOR=#006400][I]'your code[/I][/COLOR]
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Data].[Month].[Month]").VisibleItemsList = Array([COLOR=#ff0000]VSL[/COLOR])
End Sub
not quite what I'm looking for where intervention is needed by the user