CS 100 (Learn)CS 100 (Web)Module 04


Excel: Functions

(direct YouTube link)

NOTE: If your internet access is restricted and you do not have access to YouTube, we have provided alternate video links.

TRANSCRIPT

Note: This video transcript has been slightly modified. Corrections are marked with strikethrough, and alternative wording has been placed in [square brackets] to correct some of the awkward or confusing phrasing in the videos.

In this video we are going to review the terminology we use when [working] with functions, and we will see a couple [of] built-in functions in Excel.

I am going to [review] high school level mathematics functions.

You may remember a function as something like "f(x)" is "2x+3", and you [can] "plug in" values of X.

f(5) would be 10 plus 3, [which] is 13. f(10) would be 2 times 10, [which is] is twenty, plus 3 is 23. This is a function.

You have the function name and then you also have function parameters. It produced a value.

Functions in Excel are very similar: we are going to have a function name and then we are going to have parameters.

If you are given a function name and its parameters, it will calculate a value for you.

Let's [look at] one of the most basic functions in Excel: the "sum" function.

I am going to start off my formula by typing equals and I am going to type "sum" and then I use a bracket and then you will see down below it is prompting me that to "sum", I need numbers.

I am going to [write] what is [the sum of] 10 and 5 and 20? It is going to add those up.

You might look at "sum" and [ask] "What is the point of that? I can just use the plus operator".

We will motivate ["sum"] in a future video. For now, [we will] look at the terminology we are using.

We start [every] formula with the equal sign, and then we have the name of the function... in this case it is "sum" (for summation) and then we have a number of parameters in this case three parameters: I am telling it to add up 10 and 5 and 20.

Another function that might be slightly more useful might be "average" I am going to type in "average", and then I might do the same numbers: 10, 5 and 20. You might not be as quick to [calculate] that the average of those is eleven and two-thirds.

These are two examples of built-in functions in Excel that have a name and number of parameters.

You can combine and use more than one function in a formula. For example, I might take the average of 10, 5, and 20 and then add that to the sum of 3, 4 and 5.

You can so nest formula [functions], [which] is important. Instead of writing the average of 10, 5, and 20 and adding that to 3, 4, and 5... what I [can] do is just go ahead and do is "sum(average(10,5,20),3,4,5)".

Now you can see I have put "average" inside of "sum". You can nest [functions] and combine them together and use them in lots of interesting combinations.

Make sure you use brackets properly to [ensure that] you [use the correct order of operations].

Excel is pretty [cool]... if I go up to the formula bar, it will show me which bracket [matches to the current bracket].

If you notice, when I move to [a different] bracket with my cursor, it will show me where this opening bracket is (or where the ending bracket is). [In addition,] underneath [the formula bar, Excel] shows me what parameters [are expected]. "sum" and "average" are quite straightforward... they both expect numbers... but later on there will be functions with more complicated parameters and [this feature will help us] use them.