Category Archives: Arrays

Finding square roots …

… to 100 decimal places. Why would anyone want to do that? To solve Project Euler Problem 80: “It is well known that if the square root of a natural number is not an integer, then it is irrational. The … Continue reading

Posted in Arrays, Excel, Maths, Newton, UDFs, VBA | 2 Comments

Moving Average Function

The previous post presented a simple moving average user defined function (UDF).  This has been extended to provide additional functionality: A weighted average may be returned; either a linear weight with a specified step value, or a using any specified weighting … Continue reading

Posted in Arrays, Excel, UDFs, VBA | Tagged , , , | 1 Comment

Moving averages and User Defined Array Functions

I have recently needed to work with moving averages on a large-ish data set (about 10,000 rows x 10 columns), and for reasons that I will describe in the next post, decided that a User Defined Function (UDF) would be … Continue reading

Posted in Arrays, Excel, UDFs, VBA | Tagged , , , , | 8 Comments

More on Worksheetfunction vs UDF

A recent post at Roy Maclean’s VBA Blog suggested that the difference between using a worksheetfunction call in VBA and writing a User Defined Function (UDF) to do the same job was not enough to be worth worrying about.  He tested … Continue reading

Posted in Arrays, Excel, UDFs, VBA | Leave a comment

A Sort Function

There is often a need to sort data within a VBA routine, but VBA does not have a built in sort function, so I recently had a look for what is on offer on the Internet. Chip Pearson has an … Continue reading

Posted in Arrays, Excel, UDFs, VBA | Tagged , , , | 21 Comments