Sub Add_Validation_Formulas()
Dim Lrow As Long
Lrow = Cells(Rows.Count, "A").End(xlUp).Row
'From each tab listed in column A get values from the Resource totals (L3:L7)
Range("B3:B" & Lrow).FormulaR1C1 = "=IFERROR((INDIRECT(RC1&""!$L$3"")),"""")"
Range("C3:C" & Lrow).FormulaR1C1 = "=IFERROR((INDIRECT(RC1&""!$L$4"")),"""")"
Range("D3:D" & Lrow).FormulaR1C1 = "=IFERROR((INDIRECT(RC1&""!$L$5"")),"""")"
Range("E3:E" & Lrow).FormulaR1C1 = "=IFERROR((INDIRECT(RC1&""!$L$6"")),"""")"
Range("F3:F" & Lrow).FormulaR1C1 = "=IFERROR((INDIRECT(RC1&""!$L$7"")),"""")"
Range("G3:G" & Lrow).FormulaR1C1 = "=SUM(RC[-5]:RC[-1])"
Range("I3:I" & Lrow).FormulaR1C1 = "=IFERROR((SUM(INDIRECT(RC1&""!$L$11:$L$5000""))),"""")"
Range("K3:K" & Lrow).FormulaR1C1 = _
"=IF(RC9<>RC7,""Check the tab that’s listed in column A. The Sum of the Resouce Types do not equal the total value in Column L for that tab"","""")"
With Cells(Lrow, 1).Offset(1)
.Formula = "IMPORT TAB TOTALS >"
End With
With Cells(Lrow, 2).Offset(1)
.Formula = "=SUM(B3:B" & Lrow & ")"
End With
With Cells(Lrow, 3).Offset(1)
.Formula = "=SUM(C3:C" & Lrow & ")"
End With
With Cells(Lrow, 4).Offset(1)
.Formula = "=SUM(D3:D" & Lrow & ")"
End With
With Cells(Lrow, 5).Offset(1)
.Formula = "=SUM(E3:E" & Lrow & ")"
End With
With Cells(Lrow, 6).Offset(1)
.Formula = "=SUM(F3:F" & Lrow & ")"
End With
With Cells(Lrow, 7).Offset(1)
.Formula = "=SUM(G3:G" & Lrow & ")"
End With
With Cells(Lrow, 9).Offset(1)
.Formula = "=SUM(I3:I" & Lrow & ")"
End With
MsgBox "The last row is " & Lrow
Range("A" & Lrow + 2) = "54_TPL_01_02_Summary"
End Sub