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 »

Writing code in the local language is actually taught by about 100% of the German VBA books, which I have read. Which is “kind of ok”, if the VBA code only works on German computers. However, if this is not …

VBA – How to avoid naming variables with non-latin alphabet characters (special letters) Read more »

After writing about the longest palindromic substring, now it is time to see the longest palindromic subsequence. What is the difference? Pretty much, if we take the word abracadabra: the longest substring is ada in abracadabra the longest subsequence is …

VBA – Longest Palindromic Subsequence Algorithm with Excel – GIF Read more »

The longest palindromic substring algorithm exists since 1975. It is different (and easier) than the longest palindromic subsequence. The idea of the substring is to return “anana”, if “bananazorro” is given. This is achieved with a 2 dimensional boolean array matrix and …

VBA – Longest Palindromic Substring Algorithm with Excel – GIF Read more »

Inserting an image to Excel with VBA is actually one line: ThisWorkbook.Worksheets(1).Pictures.Insert (“C:\Users\myPic.png”) The interesting part happens, when it should be correctly positioned. In order to position it the way we want, we need to give 3 parameters – the …

VBA – Insert an image/picture in Excel and position it correctly Read more »

The idea of the article is to make an updateable combobox, which takes all the keys of column A and writes them to the ComboBox. Then, upon selection of the corresponding values in the combobox, it provides the corresponding values …

VBA – Put a Collection inside a Scripting Dicitonary OR Make an Updateable ComboBox Read more »

The idea of the article is to show how to add, edit and remove specific entries of the ListBox in Excel through VBA: ListBox is a control, which is available through Developer>Insert>ActiveX>ListBox in Excel: Once you add it, it has …

VBA – ListBox in Excel – Adding, Editing and Removing Data Read more »

There are parts of #VBA, that can scare any VBA developer, who has not bumped into other languages. Although, the “abstract class” term is quite popular in C# and other languages, and is quite easy to be created, in VBA, …

VBA – Abstract classes. Classes, that cannot be instantiated. Read more »

Finding the biggest square of specific units in a given matrix of these units is a standard dynamic programming problem. The examples in Google for it are above 18 million, thus I would simply show how it is done with …

C# – Find the Biggest Square in a Matrix – What can Excel and VBA add to it? Read more »

Automation of Excel is actually pretty interesting task. VBA is indeed the best built-in tool for this and although there is a lot of “hate” towards it it really deserves to be taken into account seriously, at least for small daily …

VBA – Extracting text from string between two identical characters using VBA Read more »

Writing for RegEx in VBA is sometimes a good idea and sometimes a bad idea. Anyway, if you need to write one, you better be careful. These are the RegEx articles in VBA in VitoshAcademy so far: https://www.vitoshacademy.com/vba-regex-in-excel-part-2/ https://www.vitoshacademy.com/vba-regex-in-excel/ So, …

VBA – RegEx Used to Take the Valuable Data Out Read more »