If the condition evaluates to TRUE then, it simply takes the program control to the instructions inside the IF block and starts executing them sequentially. On the other hand, VBA IF Statement checks a condition but it doesn’t return any value. The IF Function in Excel and the IF Statement in VBA are basically designed to do the same tasks, but the way they work is slightly different from each other.Įxcel IF function checks a particular condition and if the condition is TRUE, it returns one value otherwise it returns the second value. If you have followed my earlier posts, then you would remember that we discussed If Function in Excel. The task of the IF Statement is to check if a particular condition is met or not. IF statement in VBA is sometimes also called as IF THEN ELSE Statement. IF is one of the most popular and frequently used statements in VBA.
0 Comments
Leave a Reply. |