O'Reilly logo

Excel VBA Programming For Dummies, 5th Edition by John Walkenbach, Michael Alexander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Using VBA and Worksheet Functions

IN THIS CHAPTER

Bullet Using functions to make your VBA expressions more powerful

Bullet Using the VBA built-in functions

Bullet Using Excel worksheet functions in your VBA code

Bullet Writing custom functions

There are three flavors of functions: those built into VBA (vanilla), those built into Excel (strawberry), and other functions written in VBA (chocolate). Previous chapters mention how you can use functions in your VBA expressions, and this chapter provides a full explanation. Functions can make your VBA code perform some powerful feats, with little or no programming effort required. If you like that idea, this chapter’s for you.

What Is a Function?

Except for a few people who think Excel is a word processor, all Excel users incorporate worksheet functions in their formulas. The most common worksheet function is the SUM function, and you have more than 500 others at your disposal.

A function essentially performs a calculation and returns a single value. The SUM function, of course, returns the sum of a range of values. The same holds true for functions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required