Category Archives: VBA

Two Timers

The simplest way to check the execution time of VBA code is with the built in Timer function, but this returns a single precision value in seconds, resulting in a minimum time step of about 10 milliseconds.  For VBA code … Continue reading

Posted in Excel, Link to Python, VBA | Tagged , , , , | 2 Comments

Feet and inches, and other units

Following a query at Eng-tips I have had a look at options in Excel for converting metres to feet and inches, with the inches displayed as a fraction rather than a decimal. Converting from metres to feet or inches is … Continue reading

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , | 1 Comment

Python Matrix Functions with ExcelPython – 2

Following the previous ExcelPython post I have modified the VBA and Python code for improved performance and to simplify the Python coding.  The main change is that where Numpy Arrays are required in the Python code, these are now created … Continue reading

Posted in Arrays, Excel, Link to Python, Maths, NumPy and SciPy, UDFs, VBA | Tagged , , , , , , | 14 Comments

Linking to Python with Excel-Python, and Python matrix functions

I have been experimenting for a few weeks with a new package linking Excel to Python, by the name of ExcelPython.  Here is what the author says about it: “ExcelPython is a lightweight, easily distributable library for interfacing Excel and … Continue reading

Posted in Arrays, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA | Tagged , , , , , , , , | 5 Comments

Dividing shapes into layers

For reasons that will become apparent in a later post, I need to rotate irregular polygons, defined by the coordinates of each corner, by a specified angle, and then split the resulting shape into horizontal trapezoidal layers. I have written … Continue reading

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