Category Archives: Arrays

Comparing floating point numbers

Some of the issues raised in this post: https://newtonexcelbach.wordpress.com/2011/12/20/when-does-35-not-equal-35/ arose when writing the functions for the previous post on combining arrays.  In particular, when values from the two arrays are “equal” the function should create one entry in the combined … Continue reading

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

Combining arrays

Part of the Macaulay spreasheet presented in recent posts required the formation of a list of points along a beam where the functions needed to be evaluated.  These are: The support points, the changes of cross section, and the output … Continue reading

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

IP2 Update, ByRef and ByVal

A recent comment pointed out that the IPPlaneLine function (intersection of a 3D line with a plane) in the IP2 spreadsheet was giving incorrect results.  This has now been fixed, and the corrected spreadsheet can be downloaded from IP2.zip. The problem turned out … Continue reading

Posted in Arrays, Coordinate Geometry, Excel, Newton, UDFs, VBA | Tagged , , , , , | 1 Comment

More on writing arrays to the worksheet

Writing a large VBA array to the worksheet in a single operation, rather than cell by cell, can result in a huge improvement of the speed of many macros.  The basic technique was described here.  I recently wanted to modify this … Continue reading

Posted in Arrays, Excel, VBA | Tagged , , | 3 Comments

Area from Vectors

The previous post looked at User Defined Functions (UDFs) for working with vectors, including examples of functions to find the area of polygons defined by coordinates.  In this post the functions will be extended to find other section properties (such … Continue reading

Posted in Arrays, Coordinate Geometry, Excel, Maths, UDFs, VBA | Tagged , , , , , , | 5 Comments