Hi all,

I have the below code to sum a range of valued in the last colum but the return value is #NAME! does anyone know where am I going wrong?

    ESlc = Sheets("Energy Summary").Cells(10, Columns.Count).End(xlToLeft).Column
    
    With Sheets("Energy Summary")
        TotalLC = .Cells(22, Columns.Count).End(xlToLeft).Column
        str2 = .Range(.Cells(10, ESlc), .Cells(21, ESlc)).Address
        
        .Cells(22, TotalLC + 1) = Application.Evaluate("SUM(Energy Summary!str2)")
    End With
Thanks