#### Kalie

##### Mechanical

- Aug 30, 2009

- 4

i have x and y array's i want to multiply. somthing like MMULT(Array1;Array2) but this time using vba function called planck()

-------------------------------------------------

Public Function Planck(Lambda As Double, Temperature As Double) As Double

Dim C1 As Double, C2 As Double, Eee As Double

C1 = 374200000#

C2 = 14390#

Eee = 2.718281828

If Lambda * Temperature < 200 Then

Planck = 1E-16

Else

Planck = C1 / (Lambda ^ 5 * (Eee ^ (C2 / (Lambda * Temperature)) - 1#))

End If

End Function

-------------------------------------------------

xArray=B11

x_vals=(0.1,0.15,0.2,0.3,0.4,0.7,1,2,4,6,10,20,40,60,100)

and

yArray=A2:A8

y_vals=(50,100,300,800,1000,2000,5800)

I can do it with very long way but i am wondering if someone know a function to solve this so I can simply select on B28 and Ctrl+shift+enter and get the table calculated.

ps. i get the vba code from:

[faculty.virginia.edu/ribando/modules/xls/VBAPrimer.pdf]

and i use excel 2002