I'm trying to use a named value to reference a table
The "Named Value" = PM_JPR_TBL
In this example I want the value to be "TBL_Dec_JPR_PY"
I want to use PM_JPR_TBL in these two locations but I can't make it work. Any help would be appreciated
The "Named Value" = PM_JPR_TBL
In this example I want the value to be "TBL_Dec_JPR_PY"
I want to use PM_JPR_TBL in these two locations but I can't make it work. Any help would be appreciated
VBA Code:
JPR_tab = ActiveSheet.Name
If JPR_tab = "Jan JPR" Then
PM_tab = "Dec JPR (PY)"
End If
If JPR_tab = "Jan JPR" Then
PM_JPR_TBL = "TBL_Dec_JPR_PY"
End If
'Get JPR Table Name
Range("A2").Select
Dim TableNameJPR As ListObject
Set TableNameJPR = ActiveCell.ListObject
Range(TableNameJPR & "[ACCEPTED LABOR]").Value = "=IF(IFERROR(TEXTAFTER([@[PROJ '#]],"".""),"""")=""PM"",SUMIF(PM_JPR_TBL[PROJ '#],LEFT([@[PROJ '#]],7),TBL_Dec_JPR_PY[ACCEPTED LABOR]),SUMIF(TBL_Projects[Project '#],LEFT([@[PROJ '#]],7),TBL_Projects[Accepted Labor]))"