Lesson 2 - Excel Functions
Lesson 2 - Excel Functions
Using functions
A function is a pre-defined formula that helps perform common mathematical functions. Excel literally has hundreds of different functions to assist with your calculations. Building formulas can be difficult and time-consuming. Excel's functions can save you a lot of time and headaches. You could use an Excel function called Average, for example, to quickly find the average of range of numbers. Or you could use the Sum function to find the sum of a cell range. Excel XP contains many different functions.
Basic Functions
SUM - summation adds a range of cells together. AVERAGE - average calculates the average of a range of cells. MAX - identifies the largest number in a range of cells. MIN - identifies the smallest number in a range of cells.
Basic Functions
SUM
=SUM(A1:A10) =SUM(A1:B10,C3) =SUM(A1:B10,D1:E10)
AVERAGE
=AVERAGE(A1:A10) =AVERAGE(A1:B10,C3) =AVERAGE(A1:B10,D1:E10)
MAX
=MAX(A1:A10) =MAX(A1:B10,C3) =MAX(A1:B10,D1:E10)
MIN
=MIN(A1:A10) =MIN(A1:B10,C3) =MIN(A1:B10,D1:E10)
COUNTIF Function
The COUNTIF function is used to count the number of cells in a range that meet specific criteria. This function contains two arguments. COUNTIF Function Syntax =COUNTIF(Range,"Criteria") The Range argument is the range address that will be the subject of the count. The Criteria argument is the specification that must be met for the cell to be counted. The criteria argument is surrounded by quotation marks.
COUNTIF Function
=COUNTIF(A1:A10,mango") Displays the number of cells in the range indicated that contain the label mango. =COUNTIF(B1:B10,">=3") Displays the number of cells in the range indicated that contain values greater than or equal to 3.
COUNTBLANK Function
The COUNTBLANK function is used to count the number of empty cells in a range. =COUNTBLANK(A1:A10) Displays the number of empty cells in range A1:A10. =COUNTBLANK(B1:B10,D1:D10) Displays the number of empty cells in ranges B1:B10 and D1:D10.
IF Function
The IF function is a logical function that tests a condition and then returns a result based on that condition. If the condition is TRUE, a user specified value displays. If the condition is FALSE, a different specified value displays.
IF Function
IF Function Syntax IF(logical test,value if TRUE,value if FALSE) =IF(A1>=75,"Pass","Fail") If a student's exam grade in cell A1 is greater than or equal to 70, the word Pass will display, otherwise, Fail will display. When text is the True and False arguments, they must be enclosed in quotation marks. =IF(A1>50000,500,0) If the Sales amount in cell A1 exceeds $50,000, then display a bonus of $500, otherwise, show 0 for a bonus. =IF(A1<20,B1,B1*.9) If the Quantity Purchased in cell A1 is less than 20, then the customer pays full price which is in cell B1, otherwise, they get a 10% discount which is the full price * 90%.
Nested IF
Nested IF functions are a simple way to do a complex conditional formula. Nested IF functions allow you to use up to seven IF functions to impose conditions. Limited to 7 conditions only.
Sample Situation
To illustrate, let's say you have a spreadsheet that you use to keep track of your sales force. The rate of commission each sales person receives is based on the amount of sales they have generated for that month. For example:
From $1 to $10 earns 10% commission rate From $11 to $100 earns 15% commission rate Anything over $100 earns 20% commission rate
Sample Situation
Assuming the amount of sales is in column B, starting at row 4, and that the column containing the commission is formatted for percentages, this is what the nested IF function would look like:
=IF(B4<=10, 0.1, IF(B4<=100, 0.15, 0.2))
Sample Situation
Sample Situation
This nested IF function says that if the cell B4 is less than or equal to 10, then put .10 in this cell (the commission), if the cell B4 is greater than 10, but less than or equal to 100, then put .15 in this cell. If the number in cell B4 is greater than 100, then put .20 in this cell.
ROUND Function
In Excel, the ROUND function returns a number rounded to a specified number of digits. The syntax for the ROUND function is: ROUND( number, digits ) Example using the image at the right: =ROUND(A1, 0) would return 663 =ROUND(A1, 1) would return 662.8
Sample Situation
You are working on a spreadsheet, and need to know the monthly payment of a loan.
After putting all the necessary values in the argument list, Excel will then generate the computed result.