I would like to convert nominal data values into logarithmic values to understand rates of change. The data is in the form of an array and I would like to observe the log values given the first nominal value in the series compared to the current value. What formula can I use to do this if I want to incorporate a first value and a current value? The code I have thus far is below.
The code structure may be misleading. I anticipate using both variables Array1 and Array2 to define a currently undefined Log variable associated with the current value (array2).
The code structure may be misleading. I anticipate using both variables Array1 and Array2 to define a currently undefined Log variable associated with the current value (array2).
Code:
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'X This UDF converts an array of nominal values into an array of logarithmic values X
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Function LogPriceData(Arr As Variant, numberObs As Integer) As Variant
Dim yy As Integer
Dim Array1 As Integer
Dim Array2 As Integer
Array1 = Application.WorksheetFunction.Index(Arr, 1, 2)
For yy = 1 To numberObs
Array2 = Application.WorksheetFunction.Index(Arr, yy, 2)
Next yy
End Function