Lesson 7 - If Then

Outcome of this Lesson

This is a KEY decision control structure and you will probably use it frequently.

Use If … Then … Else … when you want to run one or more lines of code based on the result of checking a condition.

Lesson 7 shows you three different examples:

  • Simple If … Then
  • If … Then … Else
  • If … Then … Elseif


Download the workbook

After you watch the video, I recommend you open the example workbook.

And play around with declaring constants.

You can get the workbook at the beginning of Module 5 (Downloads).

Refer to the PDF Handout

For a handy summary of the key concepts, look at the Module 5 PDF Handout.

You can get the PDF Handout at the beginning of Module 5 (Downloads).



Write your comments and feedback below

  • If you have questions or comments about this lesson, write it in the section below.
  • Alternatively you can email the instructor Victor at [email protected]

Complete and Continue