I am trying to help automate a tedious task and I think a user defined function would come in really handy. What I want to do is to have a function that takes a line number (or 1D array of that line) and a number and does some simple arithmetic on it. This is what I have tried so far, but it fails to compile:
REM ***** BASIC *****
Function CON(a, b)
CON = a[2] * b * a[8] * (1 + (0.5*a[3])) * (1 - (0.15*a[4]))
End Function
Sub Main
End Sub
‘a’ is the array, and I would have expected a[2] to be cell Cn where n is the row number. ‘b’ is just a float.