View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Kaak[_6_] Kaak[_6_] is offline
external usenet poster
 
Posts: 1
Default Fibonacci function/command in excel?...tia sal


Put this in module and you an use it in your sheet.

Function Fibonacci(i)

If i = 1 Or i = 2 Then

tempsum = 1

Else

t1 = 1
t2 = 1

For j = 3 To i

ts = t1 + t2
t1 = t2
t2 = ts

Next

tempsum = ts

End If

Fibonacci = tempsum

End Function


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=377129