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 »

Excel’s ranges and cells are both complicated and very simple. They are simple, because everyone has an idea what is a range and what is a cell, and they are complicated, because these are both: Properties of the worksheet object …

VBA – Cells and Ranges in Excel (A bit more than the standard story) 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 »

Reading from Excel in C# is actally not at tough as many VBA developers would assume. The simple reading is actually quite straightforward – there is only small little trick, requiring the adding of the Microsoft.Office.Interop.Excel reference to the Visual …

C# – Reading from Excel Spreadsheets with Asynchronous Programming (Async) Read more »

Getting the last row of a given column in Excel with a formula or with VBA is quite a trivial task. It is explained here quite well 🙂 However, when we come to C#, the only “trick” that is provided …

C# – How to get the last filled cell of a given row in Excel 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 »

Getting the last row of a given column in Excel is easily done with a User-Defined Function in VBA: Function LastRow(wsName As String, Optional columnToCheck As Long = 1) As Long Dim ws As Worksheet Set ws = Worksheets(wsName) LastRow …

Last Used Row (Last Used Column) in Excel with Formula (without VBA) Read more »