How Functions Work
Think of Numbers’ function library as an army of math-minded elves waiting to do your bidding. Each elf has a specific job it knows how to do; you give it the raw materials it needs to do that job—a set of numbers to average, for example—and it comes back with the answer. You don’t have to understand how it gets the answer or what equations and incantations it performs behind the scenes; just give it your figures, and it hands you the result. Every one of your little minions has a name and even brings along its own basket to hold the raw materials you provide.
The busiest and most popular of all spreadsheet functions is without a doubt SUM. You’ve already seen this little guy in action several times in the previous chapter. SUM’s job is simple: It adds the numbers you put in its metaphorical basket, a pair of parentheses that you add immediately after the function name. For example, this formula adds the numbers inside the parentheses and returns the value 10:
=SUM(4, 2, 3, 1)
Every function has to be followed by a pair of parentheses in order for you to give it your data. Inside the parentheses is the place where you ask the question you want answered. The raw materials you pour into a function’s parentheses are known as its arguments. They get along better than their confrontational name suggests, even lining up in a specific order to feed the function the info it needs. Some functions, for example, require a specific set of arguments in a defined order; you have ...
Get iWork '09: The Missing Manual 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.