If Then Statement

A collection of 8 posts

How To Use VBA Delete Blank Cells In Excel

Below we will look at a program in Excel VBA that deletes blank cells. Situation: 1. First, we declare two variables of type Integer. One named counter and one named i. We initialize
23 October 2020

How To Use Mod Operator In Excel

The Mod operator in Excel VBA gives the remainder of a division. Place a command button on your worksheet and add the following code line: MsgBox 7 Mod 2 Result when you click
19 October 2020

How To Check For Prime Numbers In Excel

Below we will look at a program in Excel VBA that checks whether a number is a prime number or not. Before you start: in mathematics, a prime number is a number that
18 October 2020

How To Use Excel VBA Select Case

Instead of multiple If Then statements in Excel VBA, you can use the Select Case structure. Situation: Place a command button on your worksheet and add the following code lines: 1. First, declare
17 October 2020

How To Using Excel VBA for Tax Rates

Below we will look at a program in Excel VBA that calculates the tax on an income. The following tax rates apply to individuals who are residents of Australia. Taxable income Tax on
16 October 2020