If you array-enter (CTRL+SHIFT+ENTER) your function [logarray(A1:A4)]
into a HORIZONATL range (e.g. C5:F5), it will work perfectly.
BUT, if you want to use a VERTICAL range (e.g. B1:B4), you should
change the code line:
LogArray = new_array
to:
LogArray = Application.Transpose(new_array)
I tried both cases separately, and it worked for both types of
ranges. The key point is you get a horizontal array, and transpose it
to fit into a vertical range. It is a little modification. You do not
have to rewrite your code from scratch.