I am trying to get the sum of columns G:26 to 1 above the "Total Service Fees" cell. I am running into a Run-time error '1004'. Application-defined or object-defined error. Does anyone know what this could be from?
Worksheets(1).Select
Dim rng1 As Range
Dim strSearch As String
strSearch = "Total Service Fees"
Set rng1 = Range("F15:F100").Find(strSearch, , xlValues, xlWhole)
If Not rng1 Is Nothing Then
rng1.Offset(0, 1).Select
ActiveCell.Formula = "=SUM(G26:" & ActiveCell.Offset(-1, 0).Select & ")"
Else
MsgBox strSearch & " not found"
End If
I get the right answer, but I still get this error.