Same article, but for Python is here – https://www.vitoshacademy.com/python-split-worksheet-to-worksheets-save-excel-worksheets-to-csv/ This article does 2 things: Splits one worksheet to multiple worksheets Then goes through the worksheets and saves them as *.CSV files I hope that is enough for you. Ok, so …

VBA – Split worksheet to worksheets, save Excel worksheets to csv Read more »

Option Compare  in VBA is the thing, that will save you ugly stuff like this one: Sub Testing() Dim userInput As String userInput = InputBox(“What is decimal 4094 in hex?”) If UCase(userInput) = UCase(“ffe”) Then Debug.Print “You have correctly written …

VBA – Option Compare (Text || Binary || Database) Read more »

Getting N-th string between two substrings might sound a bad idea, until you do not need it. And with VBA, you better have something prepared. So, imagine the following XML (from this article here): <FootballInfo> <row> <ID>1</ID> <FirstName>Peter</FirstName> <LastName>The Keeper</LastName> …

VBA – Get Substring Between 2 Substrings – Locate value of Nth XML Read more »

Transforming Range to Array in VBA is actually a one liner – we take the range and we assign it to a variant: Dim myRange As Range Set myRange = Range(“a1″).CurrentRegion Dim myArray As Variant myArray = myRange The “strange” …

VBA – Ubound of Multidimensional Array or How to Get What We Need? Read more »

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 »