Excel IF Statement Two Conditions

Excel IF Statement Two Conditions - Perfect Examples

You want to check two conditions with Excel IF function? You’ve come to the right place. IF is one of Excel’s most popular and versatile functions. But things get exciting when you start combining it with multiple conditions — especially using AND, OR, nested IFs, and even blending it with SUMIFS. In this article, let […]

Make VBA String Comparisons Case In-sensitive [Quick Tip]

Today, while answering a reader’s email, I wrote this VBA code, If Target.Value = “yes” Then ‘do something End If But I realized that my code would run only the Target cell has “yes” in it. It wont run if the target cell has “YES”, or “Yes” or “YeS”. This is because by default, all […]

Understanding Variables, Conditions & Loops in VBA [Part 2 of 5]

In part 2 of our VBA Crash Course, we are going to learn what Variables, Conditions & Loops are and how to use them in Excel VBA.

What are Variables, Conditions & Loops?

If you are new to computer programming, you might think I am speaking legalese. So, to make it easy to understand, lets assume you run a bunch of stores across the town. To make it colorful, lets call your stores “We are nuts” – a dry fruit and nuts store chain. At the end of every day, you call each of the 24 store managers and ask them how much sales they have made in that day.

Now, you are not the kind of boss who micro-manages & nitpicks. So you don’t really note down sale for every store. Instead, as you call the store manager, you just mentally update the total. So first store says “$2,300” your total is 2300. Second manger says “$4,000”, the total now will be 6300. So on.

The value 6300 here is nothing but a variable.

We will use the “We are nuts” example thru out this lesson & towards the end we will build a sales logging application using Excel VBA.