Excel Virtuoso

Excel Virtuoso

VBA Tutorials, Solutions, and Experiments
The Excel Virtuoso blog provides excellent resources, training, and information to help you become familiar with advanced features of Microsoft Excel.
Find out how add-ins and templates can help you get the most out of Excel.
Many posts in the blog are organized into series which cover broad topics to help build and improve your Excel skills. As series are produced, visit these pages as a launching point to get a...


Many posts in the blog are organized into series which cover broad topics to help build and improve your Excel skills. As series are produced, visit these pages as a launching point to get a general overview and link directly to specific topics/examples.

Tips and Tricks with VBA Classes

Classes can significantly increase the functionality and efficiency of VBA procedures. By properly using classes in your VBA program, you can create application-like spreadsheet and business models to accomplish many tasks, such as advanced modeling, data management, and automation. Unfortunately, not much literature exists about classes outside of their basic setup and management. The Tips and Tricks with VBA Classes series uncovers some advanced features and techniques for using classes and custom objects in VBA.

Getting Started with VBA

Visual Basic for Applications, often abbreviated as VBA, is the programming language in Microsoft Excel. By using VBA, developers have endless possibilities when it comes to building robust spreadsheets. When used properly, VBA can create application-class spreadsheets that can automate and streamline any task.

Spreadsheet Design

The idea of spreadsheet design refers to the overall experience a user has interacting with a spreadsheet. Design may conjure up thoughts of visuals and aesthetics, but that’s only a minor component. It often dictates the way users interact with an application. In the early stages of spreadsheet application development specific questions should be asked to drive design decisions. Who will be the primary user? How will the user enter and manage data? How will errors be handled? How will the user navigate to various components of the application? These are just a few questions that can act as a basis for effective spreadsheet design.

Series Highlight: Getting Started with VBA

10 Non-VBA Concepts Important for VBA Developers
As a VBA developer, it's important not to lose sight of the broader Excel application environment. VBA will always be part of Excel -- an...
Read More "10 Non-VBA Concepts Important for VBA Developers"
Series Highlights and VBA Cheat Sheet
As we approach the close of the Getting Started with VBA series, it's important to take a broad look at all topics discussed. This post...
Read More "Series Highlights and VBA Cheat Sheet"
Building a Custom Collection Class
A Collection class is a useful means to manage a large group of custom objects. The ability to store multiple classes permits the efficient operation...
Read More "Building a Custom Collection Class"
Building a Custom Class: Part 2
Classes and objects open up a host of opportunities within Excel VBA. In addition to being a powerful feature in their own right, classes can...
Read More "Building a Custom Class: Part 2"
Building a Custom Class: Part 1
If you've followed the series up to this point, you have previously worked with intrinsic (built-in) objects like Range, Shape, or Worksheet. In addition to...
Read More "Building a Custom Class: Part 1"
Introduction to Custom VBA Classes and Objects
The ability to build classes and custom objects is one of the most valuable, yet underappreciated, features in VBA. While complex and fully functional VBA...
Read More "Introduction to Custom VBA Classes and Objects"
Techniques to Organize a VBA Project
While most modern programming environments provide robust tools to organize complex projects and separate procedures, the VBA editor’s organization features are limited. While procedures can...
Read More "Techniques to Organize a VBA Project"
Building User-Defined Functions in VBA
While subroutines can be called within other subroutines, their environments are generally segregated -- a subroutine cannot directly provide any information to another subroutine. Using...
Read More "Building User-Defined Functions in VBA"

Jagged Arrays in VBA

Jagged arrays are one of the lesser known data structures in VBA. In some cases, it may be a viable an alternative to a traditional 2D multi-dimensional array. Today’s post will present three different approaches to implementing jagged arrays in your VBA project.

Google-Like Search in Excel

Today’s post introduces a Google-like search, with search-as-you-type suggestions. While it’s possible to run basic searches with VLOOKUP and other techniques, this VBA approach can provide immediate search suggestions or recommendations for the user.

Convert a Data Table from Cross-tab to Tabular Format

Cross-tab format is great for summarizing data, but not so great for working with it. Today’s post provides an overview of a VBA procedure that converts data from cross-tab to tabular format.

Case Study: VBA Implementation of a Bond Ladder

This is a short post showcasing some of the VBA procedures, classes, and coding techniques in last month’s bond ladder financial model. The model relies heavily on VBA, using it to manage displays, calculations, and data storage.

Financial Model: Bond Ladder

This post introduces a new financial model — an Excel/VBA implementation of a bond ladder portfolio and summary. Its general purpose is to calculate an average weighted yield for a ladder of bonds.

Case Study: Custom VBA Tooltips

This post provides a case study of an advanced implementation of custom VBA tooltips. While Excel offers a built-in tooltips feature for data validation, its limited to displaying simple text messages. By implementing custom tooltips through VBA, you can provide users with dynamic validation hints and infographics.

Easy VBA Tooltips

One of the most difficult parts of spreadsheet design relates to making complex spreadsheets accessible to all users. In business settings, a select group may be trained on how to use a spreadsheet model, but staff turnover may result in training gaps. This is where instructions embedded within a spreadsheet—such …

The Boss Macro

We’ll make this an April Fools’ Day tradition. Last year, I created The Garbage Financial Statement — a prank financial statement that would flip data whenever entered into a cell, and subsequently move the data to an adjacent cell whenever the user attempted to delete it. I wouldn’t recommend sending …

The On Error Statement: To Use or Not To Use

Managing coding errors can be a time consuming and complex task in VBA. Unlike many modern programming languages, VBA lacks native functions that help avoid common errors, sometimes requiring the use of the On Error statement. While the On Error statement can seemingly make a procedure work, it does not …

Series Overview: Tips and Tricks with VBA Classes

In their simplest form, VBA classes can create basic objects. By diving into advanced concepts, classes introduce some common features present in traditional object oriented programming languages. Overview This is the fourteenth and final post of the Tips and Tricks with VBA Classes series. This post acts as a summary …