- #1

- 1

- 0

help pleaase . here is the problem :If a number in a cell is 10, then the total should be 55 which is: 1+2+3+4+5+6+7+8+9+10 , how do i write a module-level( function) like that .this is what i have so far:

Public Function myfunction()

Dim sum As Double

Dim i As Integer

For i = 1 To 1000 Step 1

sum = sum + cells(i,1)....( THIS IS THE PART THAT I'M STUCK , I'M NOT GOOD AT MATH )

Next

myfunction= sum

End Function

Public Function myfunction()

Dim sum As Double

Dim i As Integer

For i = 1 To 1000 Step 1

sum = sum + cells(i,1)....( THIS IS THE PART THAT I'M STUCK , I'M NOT GOOD AT MATH )

Next

myfunction= sum

End Function

Last edited: