This UDF should do the trick.
Function TrapArea(x As Object, y As Object) As Variant
Dim i As Integer
Dim N As Integer
' Count the number of passed x values
N = Application.Count(x)
' Check that we have the same number of y's
If Application.Count(y) <> N Then
TrapArea = "Unequal input arrays"
Else
TrapArea = 0
For i = 1 To N - 1
' Integrate using trapezium rule .....
TrapArea = TrapArea + ((y(i) + y(i + 1)) / 2) * (x(i + 1) - x(i))
Next i
End If
End Function
--
Yours aye,
John Redmayne
NATO
Scot Middleton <sc...@adnetsol.com> wrote in article
<eey5ubo...@uppssnewspub05.moswest.msn.net>...
Regards
Hans Knudsen