EXCEL VBA PRIMER   CCE 170
Brigham Young University
Norm Jones
INTRO - [Table of Contents]
EXCEL - [Formulas] [VLOOKUP] [Validation] [Names] [Operators] [IF Function] [Goal Seek] [Charts] [Annotation] [Array Formulas]
VBA - [VB Editor] [Macros] [Controls] [Ranges] [MsgBox] [Variables] [Objects] [If Then] [Debug] [Loops] [Arrays] [Strings] [User Forms] [Functions] [Excel Funs] [Subs] [Events] [Standards]
ADVANCED - [Graphics] [E-mail] [Files] [Apps] [Google Sheets]

Introduction - Table of Contents

This site is a collection of notes and extra materials associated with CCE 170 at Brigham Young University. It is essentially an online textbook where each chapter is designed to supplement one of the class lectures. It can also be used as an independent resource for learning how to program in Excel using Visual Basic for Application (VBA). This primer is divided into three main sections: the first section gives an overview of basic features of Microsoft Excel that are useful in engineering applications. The second section covers the fundamentals of VBA programming, and the third section is for some advanced VBA topics that are not covered in class but may be of interest.

Excel Fundamentals

  1. Cells and Formulas
  2. Indexing a List with VLOOKUP
  3. Data Validation
  4. Naming Cells
  5. Operators and Precedence
  6. Using the IF Function
  7. Goal Seek and Solver
  8. Creating Charts
  9. Annotation - Drawings and Equations
  10. Array formulas

Visual Basic for Applications

  1. Getting Started - Developer Interface and VB Editor
  2. Recording Macros
  3. Adding Controls to a Spreadsheet
  4. Working with Cells and Ranges
  5. Using MsgBox and InputBox
  6. Declaring and Using Variables
  7. Working with Objects
  8. Decisions and Conditions - Writing If Statements
  9. Debugging - Finding and Fixing Errors
  10. Loops - Writing Iterative Code
  11. Using Arrays to Store Sets of Data
  12. Using String Functions
  13. Creating Custom User Forms
  14. Writing Custom Functions
  15. Calling Excel Worksheet Functions from VBA Code
  16. Writing Custom Subs
  17. Trapping for Worksheet Events
  18. VBA Coding Standards

Advanced Topics

  1. Creating Custom Graphics
  2. Sending E-Mail Using VB
  3. Looping Over Files
  4. Sample VBA Applications
  5. Google Sheets and Google Apps Script

Youtube Channel

There is a Youtube Channel associated with this primer. It includes videos for a set of exercises listed on BYU CE En 170 Course Schedule and it mirrors much of the content here. The video playlists are organized in the same fashion as the above table of contents.