How to select all unlocked cells in Excel

Select locked cells

Spreadsheets are easy to break.  All it takes is one press of a key and suddenly every formula is displaying in an error message.  That’s not good!  This is why we apply worksheet protection, to prevent user error. Some think that worksheet protection is secure, however password protected worksheets can easily be unlocked with a … Read more

Sorting ListBoxes with VBA

Sorting Listboxes with VBA

I received a question from a reader recently, who wanted to sort a Listbox using VBA.  As this seemed like a common problem which many users could face, I decided to dedicate a bit of time to create a more reusable solution. In this post, we will look at two different types of Listboxes: This … Read more

VBA code to contol Form Control checkboxes

VBA Code Snippets

Checkboxes are one of the easiest ways to create interaction with users.  Controlling them with VBA makes them more flexible and more useful in Excel applications. Here is a collection of the most common code snippets and settings. Create Check Boxes The following code will create a checkbox Sub CreateCheckBoxes() ‘Create variable Dim chkBox As … Read more

How to list duplicate values (or unique values) in Excel

Unique Duplicate values with formulas

The Excel team recently announced new dynamic array formulas, which can create unique lists, sort and filter with a simple formula. These new formulas are being rolled out to Office 365 subscribers over the next few months. However, not everybody has the subscription and will upgrade when it is sensible for their business, often combining it with … Read more