Category Archives: VBA

How to Find an Exact Match Using VBA

The Search Feature in Microsoft Excel Before digging into how to look for exact matches in VBA, I’ll give you some context with the easiest way to accomplish this goal — the search function in Excel. Microsoft Excel provides us with an excellent feature that

For Loops in VBA and the Continue Statement

Loops in VBA Loops are an essential part of any programming language because they help with the repeated running of any code snippet. Just like any other language, VBA offers the following loops to enable efficient programming: Do until Do while For Foreach In this

How Nested Ifs In VBA Work with Examples

All programming languages support the “if" type of conditional statement. An if block is executed during runtime only if the condition is met. i.e., the result of a condition is equal to the Boolean value “true." Syntax If ( <conditional expression> ) ‘block of statements

How to Use IfError in VBA and Excel

Errors Happen We may come across several functions in programming languages. In VBA, we are prone to encounter errors like:  Syntax errors Compile time errors Runtime errors These are errors in code which can be handled using error handling methods. For example, you can see

No Thumbnail

Using VBA Like to Compare Strings

What is a Regular Expression? How is the Like Operator Related? In any programming language, there is a way to compare strings against some patterns. Several characters are used to create these patterns. These patterns are called regular expressions. Like in structured query language, VBA