
If the condition is true, the lines under the body of the If statement are executed. The ‘If statement’ is a conditional statement that consists of an expression followed by another expression. If the condition is true, the lines of code under the If statement are executed.Įnter the marks in cell A1 and click on the command button to get the result.

If, If-Else, For and While Loop If statement The left keyword will extract the characters from the leftmost side of the string. This is also known as concatenation.Ĭlick on the command button to get the following result. You can join the two strings by using & operator. String manipulation refers to the process of analyzing, manipulating, and effectively handling string values. When you click on the command button, you will get the following output:

A variant variable can hold any type of value. Declare the variable name and keep the type variant.To add the InputBox to your command button, execute the following steps: The InputBox function prompts the user to enter the values and returns the information entered in the dialog box.

Now, when you click on the button, you will get the following message. To create a MsgBox, add the following lines of code to the command button. The MsgBox is a dialog box in Excel that will prompt a message on your worksheet.
