LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Function doesn't work

The following function doesn't work (I get #VALUE in the cell)
It is called with, say, =IntrptFn2($B$56,$K11,$L11)
I've been unable to debug it.
Why doesn't it evaluate properly?
-------
Function IntrptFn2(sRel, tauLeft, tauRight) As Double
' =IntrptFn2($B$56,$K11,$L11) doesn't work
eL = Application.WorksheetFunction.Exp(-tauLeft)
eR = Application.WorksheetFunction.Exp(-tauRight)
es = Application.WorksheetFunction.Exp(-sRel)
IntrptFn2 = Abs((1 + tauLeft) * eL - (1 + tauRight) * eR)
' That's good for xLeft0, or xRight<0). Now inbetween
If (tauLeft < 0 And tauRight 0) Then
tauGreater = tauLeft
If (tauRight tauLeft) Then
tauGreater = tauRight
End If
eG = Application.WorksheetFunction.Exp(-tauGreater)
IntrptFn2 = (1 + sRel) * es - (1 + tauGreater) * eG
End If
End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this function supposed to work? [email protected] Excel Worksheet Functions 6 May 8th 09 05:14 PM
need a function that will work using multiple work books and sheet capt c Excel Worksheet Functions 1 March 30th 09 10:20 PM
my TEXT function won't work Roger[_2_] Excel Worksheet Functions 2 May 29th 07 04:53 PM
Why does my Function not work? [email protected] Excel Discussion (Misc queries) 2 April 27th 07 10:22 PM
how do i get the mid function to work with a zero garbold Excel Worksheet Functions 7 June 7th 06 10:58 PM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"