View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Syntax in worksheet functions for individual values instead of ranges

PS2.... I wrote:
"joeu2004" wrote in message
...
REM wrote:
Ideally I would like the numbers to be variables also.


knownY = Array(5,10)
knownX = Array(10,20)
x = 15
y = WorksheetFunction.Forecast(x,knownY,knownX)


Or:

y = WorksheetFunction.Forecast(x,Array(y1,y2),Array(x1 ,x2))
MsgBox y

If you still cannot figure it, provide the relevant VBA context --
declaration of variables and code fragment showing how those variables are
set up.