One of the easiest ways would be to go to the vba editor, and select Tools |
References | and select "atpvbaen.xls."
Then you can write code along this line...
Sub Demo()
Dim c
c = complex(3, 4)
Debug.Print c
Debug.Print ImAbs(c)
'// Fourier is a Subroutine
'// Use Ranges for Input / Output
Fourier [A1:A8], [B1:B8], False, False
End Sub
which prints:
3+4i
5
If you don't wish to set a vba library reference, here is another option. I
added some ideas that I use...
Sub Demo()
Const InverseFFT As Boolean = True
Const ForwardFFT As Boolean = False
Const NoLabels As Boolean = False
Const Labels As Boolean = True
Const FFT As String = "ATPVBAEN.XLA!Fourier"
Run FFT, _
ActiveSheet.Range("A1:A8"), _
ActiveSheet.Range("B1"), _
ForwardFFT, _
NoLabels
End Sub
HTH :>)