Function fixlog(n As Integer) As Integer
Dim l As Double, i, j, k As Integer
l = log(n) / log(4#)
i = l - Fix(l)
j = Sgn(Fix(l) - l) + 1
k = Fix(l - i) - j
fixlog = 4^ ^ k
End Function
Excel VBA
Function fixlog(n As Integer) As Integer
Dim l As Double, i, j, k As Integer
l = log(n) / log(4#)
i = l - Fix(l)
j = Sgn(Fix(l) - l) + 1
k = Fix(l - i) - j
fixlog = 4^ ^ k
End Function
Excel VBA