Sub myNamerng()
Dim rng As Range
Dim lastrow As Long
lastrow = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 8).End(xlUp).Row 'Look for the last row in the Defined named range
Set rng = ThisWorkbook.Sheets("Sheet1").Range("H2:H" & lastrow) 'The range of the Defined named range
With rng
On Error Resume Next
ActiveWorkbook.Names("Name1").Delete 'Delete the current Defined name range; Change the 'Name1" tag to your current named range
ActiveWorkbook.Names.Add Name:="Name1", RefersTo:=rng 'Assign a new Defined name range based on rng range
.Cells(lastrow).Formula = "=SUM(Name1)" 'Insert the SUM formula
End With
End Sub