VFA_Consulting
New Member
- Joined
- Dec 13, 2017
- Messages
- 3
I do a lot of forecasting and am tired of having to repeatedly write a formula from scratch to test whether or not my forecasts fall within the prediction interval. To be clear what I mean, is that I may predict a value of 1,000 with an 80% chance it will be within 900 and 1100. I need to test for dozens of rows at a time, which values fell within such an interval. I tried to create a UDF to make this easier:
Public Function PICheck(Value, Maximum, Minimum)
PICheck = IF(Value<Minimum,-1,IF(Value>Maximum,1,0))
End Function
I get a Compile Error: Syntax Error. I'm sure I'm just overlooking some little thing, but despite all my experimenting and Googling, I cannot divine what it is. Does anyone see it?
Public Function PICheck(Value, Maximum, Minimum)
PICheck = IF(Value<Minimum,-1,IF(Value>Maximum,1,0))
End Function
I get a Compile Error: Syntax Error. I'm sure I'm just overlooking some little thing, but despite all my experimenting and Googling, I cannot divine what it is. Does anyone see it?