Chapter 14

Sample user-defined functions

In this chapter, you will:

  • Learn how to create and share user-defined functions

  • Review useful custom functions

  • Learn how to create and share LAMBDA functions

Excel provides many built-in functions. However, sometimes you need a complex custom function that Excel doesn’t offer, such as a function that sums a range of cells based on their interior color.

So, what do you do? You could use the calculator next to you as you work your way down your list—but be careful not to enter the same number twice! Or, you could convert the data set to a table, set a SUBTOTAL function for visible cells in the total row, and filter by color. Both methods are time-consuming and prone to accidents. What to do?

You could ...

Get Microsoft Excel VBA and Macros (Office 2021 and Microsoft 365) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.