Function Level5MakeMachineCost()
Application.Volatile (True)
r = Application.Caller.Row + 1
Do While Cells(r, "DU").Value <> "Yes"
If Cells(r, "EE").Address = "$EE$1001" Then Exit Do 'This is the line
Level5MakeMachineCost = Level5MakeMachineCost + Val(Cells(r, "EE").Value)
r = r + 1
Loop
End Function