Strings are not easy to manipulate and often we need to create a Excel Substring or VBA Substring. Excel and VBA in fact have multiple functions that support obtaining substrings. VBA Strings Manipulations Resources VBA SubString VBA InStr / InStrRev VBA Like Operator (Wildcards) VBA Regex VBA String Functions Excel vs VBA Substring functions In […]
Outlook
VBA Like Operator – Using Wildcards in Conditional Statements
The VBA Like operator is something so useful I am often surprised how rarely it is used in Excel and Access VBA. I often tend to see the Like operator as the last resort before using Regular Expressions in VBA. It replaces greatly the VBA InStr function when needing to check if a certain substring […]
Merge CSV files or TXT files in a folder – using Excel or CMD
Often we face the challenge of having to merge csv files or txt files in a folder, into a single file. Excel is the obvious tool for such tasks and today I will show a couple of easy ways for merging multiple files, in a single or even a whole structure of folders, into a […]
Making proper VBA Comments
Today we will focus on VBA Comments i.e. how to make comments in VBA or disable lines of macro code. Comments are needed in any script to explain what the code is supposed to do or provide some verbatim on certain lines / blocks of code. Scripts without comments are a nightmare for many of […]
Excel VBA Function vs VBA Sub – Excel Functions and Procedures
A VBA Function can accept parameters and return results. Functions, however, can’t be executed directly. On the other hand a VBA Sub procedure can be executed directly and can also accept parameters. Procedures, however, do not return values. We often use Subs and Functions often not thinking about their true potential and how much we […]