Category Archives: VBA

Using Matplotlib from Excel with xlwings – update

In February 2016 I posted a spreadsheet with examples of linking to the Python Matplotlib library with xlwings.  Since then updates to xlwings required some changes to the python code, specifically plot.show has been replaced with pictures.add. The spreadsheet has … Continue reading

Posted in Charts, Charts, Excel, Link to Python, Newton, NumPy and SciPy, VBA | Tagged , , , , , , , | Leave a comment

RCInteract and RC Design Functions 7.03

Since the previous post, I have updated the notes in the RC Design Functions spreadsheet to reflect the fact that with the recent update to the Bridge Design Code (AS 5100) the reinforced concrete strength design requirements for beam bending … Continue reading

Posted in Beam Bending, Concrete, Excel, Newton, UDFs, VBA | Tagged , , , , , , , , , , | Leave a comment

RC Design Functions 7.03

The latest update to my RC Design Functions spreadsheet has just been uploaded, and is available for free download (including full open-source code) from: RC Design Functions7.zip The main new feature in the latest version is a new RCInteract function, which generates an … Continue reading

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

Indexing NumPy arrays with floats …

… now you can’t. I recently updated to the latest version of NumPy (1.12.1), and today I discovered that some of my spreadsheets using NumPy arrays (via xlwings) were returning errors like: IndexError: only integers, slices (`:`), ellipsis (`…`), numpy.newaxis … Continue reading

Posted in Arrays, Excel, Link to Python, NumPy and SciPy, UDFs, VBA | Tagged , , , , , | Leave a comment

Formatting Text from VBA

In a recent Eng-Tips thread someone wanted a VBA routine to combine a value with different + and – tolerance values, formatted as superscript and subscript.  Eng-Tips (and Tek-Tips) regular, Skip Vought, came up with a macro to do the job, … Continue reading

Posted in Excel, VBA | Tagged , , , | Leave a comment

Extracting numbers from text – update

I have previously posted a spreadsheet with user defined functions (UDFs) using regular expressions to extract numbers from a text string (see Extracting numbers from text and regular expressions). I have now modified the Extractnums function to optionally return the numbers … Continue reading

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

The meaning of = in Python

In VBA, if you have an array named a and a variant named b, then the statement “b = a” creates a new array b with the same size and values as a.  If the values of either a or b are subsequently changed, the values of the … Continue reading

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