Selecting Python for a “weapon” of choice has many positive points, which I am not going to describe now. Still, if you want to run python code with the help of VBA and the Shell through the CommandPrompt of Windows, …

Run Python Functions From Excel With VBA with Shell through CommandPrompt Read more »

Mathieu Guindon is the project manager behind Rubberduck – an open-source COM add-in project written in C#, extending the glorious VBE with modern-day IDE features.  On Code Review and Stack Overflow he is closely monitoring the vba tag. Ex-moderator on Code Review  (2015-2018), Microsoft Excel MVP (2018). …

“OMG I CAN DO VB6 IN EXCEL! WATCH ME!!!” – Mathieu Guindon about VBA 15 years ago Read more »

Quick Search for value in Array. In VBA this is sometimes considered problem, as far as people tend to loop through the whole array for the search. There is a better way to do it, with System.Collections.ArrayList, which is not exactly …

VBA – How to Find TaxiCab Numbers in Excel – Quick Search in Array Read more »

There is an ERP joke, claiming that the third most popular button of an ERP system is “Export to Excel” (after OK and Cancel). Thus, working with Excel from .Net is happens often. There are some pitfalls, that you should …

.Net – Reading Excel file in C# and transferring it to a matrix Read more »

Trimming is a function, that reduces spaces. There are at least 4 ways to Trim a string in Excel/VBA: Trim VBA.Trim =Trim() WorksheetFunction.Trim Thus, is there a difference between these 4 actually? This is what MSDN says about String.Trim: Returns …

VBA – Difference between Trim, VBA.Trim, =Trim() and WorksheetFunction.Trim Read more »

After writing that the built-in Find() function in VBA does not return the first value by default, a new interesting case with the Find function appeared. In order to simulate it, the following task could be imagined: Write the first …

VBA – Why Range.Find() sometimes mistakes January with November and Febrary with December? Read more »

Ok, you have read the title correctly – there is a way to refer a parameter ByValue, even though the parameter contains explicitly the word ByRef in it. Let’s start with the functions. Imagine a function, getting an array as parameter …

VBA – How to refer a function ByVal, when the parameter is explicitly ByRef Read more »

The Range.Find() function in VBA-Excel is quite a tricky one. In general, you may think it is straight forward, because it usually returns what you are looking for, until the moment when it simply surprises you. This is the MSDN description …

VBA – Find function in Excel does not return the first value by default Read more »