Category Archives: IF

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

The “Else-If” Statement in VBA

We need conditional statements As a you develop code, there’s inevitably a need for the flow or logic to progress in a different direction based on the user’s inputs or on the details determined during runtime. This is where conditional statements are used. Example scenario

VBA If Statements with Multiple Conditions

Introduction One of the most common things to do in coding is to build logic that checks for the occurrence of multiple conditions. As a coder, whether novice or experienced, hopefully you agree that this is one of the most common coding tasks. In VBA,

How to Use IF OR Statements in VBA

In VBA, IF OR is the combined utilization of the IF statement and the OR keyword. Particularly, the OR keyword is used to construct the logic of the condition statement. The syntax for the combined IF OR statement is as follows: IF [condition statement 1]

No Thumbnail

Excel Formulas and Function, Finding Text Within Another Text, Find()

The function FIND() searches for a specific text expression inside another text and returns the first index which the text was found. You can download the workbook related to this article here. Jump To: Syntax Example 1 Example 2 Syntax: =FIND(Text_to_Find, Text_to_Search_in, Starting_Index) Text_to_Find: The

No Thumbnail

Excel Functions and Formulas, IF()

In this article I will explain the IF() function. The IF() function receives 3 input parameters. The first input parameter is a logical test. The logical test will either equate to True or False. If the logical test equates to TRUE then the second parameter