Chapter 10
Using VBA and Worksheet Functions
IN THIS CHAPTER
Using functions to make your VBA expressions more powerful
Utilizing the VBA built-in functions
Applying Excel worksheet functions in your VBA code
Writing custom functions
There are three function types: those built into VBA, those built into Excel, and custom functions written in VBA. 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.
Understanding Functions
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 used in your VBA expressions: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access