I have the following code:
Option Explicit
Function SumAboveV(column As Range)
Worksheets("Sheet16").Activate
Dim r As Range, rAbove As Range
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction
Set r = zelle.Offset(0, -2)
Set rAbove = Range(r.Offset(-1, 0), Cells(2, r.column))
column.Value = wf.Sum(rAbove)
End Function
All I want to have is to sum up all numbers I have in row B until the cell where I place the function so e.g. as you see in the attached screenshot I want to sum up all values from B2 until that cell and place the total value in row D.
I don't understand my mistake. Any ideas?


