I am attempting to create a dynamic array spill-down with cell references that adjust as the array spills down.
Say I place 10 in cell A1 and in A2 I enter:
=IF(ROWS($1:1)>9,"",LN(10+A1^2))
and manually copy this downwards. The A1 reference will adjust as I copy downwards. So the formula in A3 will refer to the value in A2 . The formula in A4 will refer to the value in A3 , etc.:
But this is manual rather than dynamic. Another manual formula that works is:
=IF(ROWS($1:1)>9,"",LN(10+INDEX(A:A,ROWS($1:1))^2))
The only way I have succeeded is to use VBA:
Public Function propr(r As Range, N As Long)
Dim arr, i As Long
If N = 1 Then
propr = Application.WorksheetFunction.Ln(10# + r.Value ^ 2)
Exit Function
End If
ReDim arr(1 To N, 1 To 1)
arr(1, 1) = Application.WorksheetFunction.Ln(10# + r.Value ^ 2)
For i = 2 To N
arr(i, 1) = Application.WorksheetFunction.Ln(10# + arr(i - 1, 1) ^ 2)
Next i
propr = arr
End Function
But I want a formula rather than a UDF.
What I have tried:
=LN(10+INDEX(A:A,SEQUENCE(9))^2)
This generates a circular reference warning:
This should be really easy, but I am not seeing it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.