I defined two named ranges; one (myplace) for the location to write the result to and one (myrange) for the range that needs to be summed. Compiler returns an error
Tried the formula method for sum, but this returns "#NAAM" error
This is the simple code I used:
Sub optelsom()
myplace = Range("plaats")
myrange = Range("deelsom")
Range(myplace).Value = Application.WorksheetFunction.Sum(myrange)
End Sub