Hello
I'm a newbie so please excuse this simple problem.
I'd like to save two cell addresses into variables and then use them in a VBA SUM command, but the following does not work, perhaps you could explain where I'm going wrong...
Sub Test()
Dim StartValue As String
Dim EndValue As String
StartValue = ActiveCell.Address
Selection.Offset(2, 0).Select
EndValue = ActiveCell.Address
Range("P4") = Application.WorksheetFunction.Sum(Range(StartValue:EndValue))
End Sub
Bookmarks