Intersection of dictionary (or of any two lists) is a list with elements, that are present in both other lists. Thus, if we have the following 3 dictionaries in Python: dict_a = dict([(‘aa’, 4139), (‘bb’, 4127), (‘cc’, 4098)]) dict_b = …

VBA and Python – Intersection of dictionaries Read more »

Converting Excel column number to letter and letter to column number is actually something that every VBA developer does at least once a day. The easiest way is probably to use the property .Column  or .Address of the range object …

VBA – Convert Excel Column Number to Letter and Letter to Column Number Read more »

Ok, if you are visiting this article, then probably the reason is that you have received the following messagebox upon openning of Excel: And after looking all over your cells, with both VBA and “Find”, you have not found anything …

How to fix – This workbook contains one or more links that cannot be updated… Read more »

Check if folder is empty: Public Function FolderIsEmpty(myPath As String) As Boolean FolderIsEmpty = CBool(Dir(myPath & “*.*”) = “”) End Function Delete all files in a folder: Public Sub DeleteAllFiles(path As String) Kill path & “*.*” End Sub Create text …

VBA – Folders and Files Functions Read more »

Yesterday I received an email, refering to some 2 old articles in VitoshAcademy for nested loops without recursion: VBA – Nested loops with recursion (Permutations)  VBA – Avoid nested loops with recursion (Part 2) As far as the person from …

VBA – Compute All Combinations of a Given Set Read more »

Copying excel worksheets around is actually a piece of cake for a VBA developer (or so they/we think). Mainly because you can record the actions and then “learn” from them, editing a bit the code and etc. Well, there is …

VBA – Copying Excel worksheet to a new workbook without leaving the old Excel reference Read more »

Although there are plenty of other tools for extracting data from a website (take a look at Beautiful Soup), VBA is somehow good, because … well, because it is somehow challenging to do it every time. Yesterday, I answered a …

VBA – Extracting financial data from a website in table format Read more »

Some 4 years ago I wrote an article for calculating magic square with python. What the article did was actually checking whether the square is magic, and not calculating a new one. This one is going to show how these …

Excel – How to build magic square with VBA, following Python Mod Mathematics Read more »

Dropdown lists in Excel usually are built from a range or from a variable list. Dropdown list from Excel Range Thus, building a dynamic dropdown list may include building a dynamic range, with undeclared end. Thus, let’s imagine that the …

Dynamic dropdown list in Excel VBA with variables Read more »