View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
[email protected] sebas_cp@hotmail.com is offline
external usenet poster
 
Posts: 7
Default Need code to sum a series

Do not really need a VBA UDF, this should work ona worksheet.

{=SUM(1/FACT(ROW(1:150)))}

or in VBA if thats what you really need

Function test(n As Integer)

Dim s As String
s = "=SUM(1/FACT(ROW(1:" + Trim(Str(n)) + ")))"
test = Evaluate(s)

End Function