Advanced function (part 1)

advertisement
Advanced Functions in EXCEL
Drop down List
A drop down list allows you to enter data into an Excel spreadsheet from a preset list of entries.
This can be done to make data entry easier or to limit the number of acceptable choices.
Example: Creating a drop down list in Excel 2007
1. Enter the following data into cells:
A1 – Project 1
A2 – Project 2
A3 –Project 3
A4 – Project 4
C2 - Project Type:
2. Click on cell D2 - the location where the results will be displayed.
3. Click on the Data tab.
4. Click on the Data Validation option from the ribbon to open the menu.
5. Click on the Data Validation in the menu to bring up the dialog box.
6. Click on Settings tab in the dialog box.
7. From the Allow menu choose List.
8. Click on the Source line in the dialog box.
9. Drag select cells A1 - A4 in the spreadsheet.
10. Click OK in the dialog box.
11. A down arrow should appear next to cell D2.
12. When you click on the arrow the drop down list should open to display the four projects.
Count , Counta, Countif , Countifs
Very important functions used to compute, analysis of big amount if data.




The COUNT function counts the number of cells in a range containing numbers.
The COUNTA function counts the number of nonblank cells in a range.
The COUNTBLANK function counts the number of blank cells in a range
The functions: Countif and Countifs count the number of cells in a range that meet criteria that
are defined on the basis of a one row or column of the worksheet.
Suppose I have a list of products that are stored in the warehouse. For each product, I know the
brand, the expiration date the product, and the quantity of the product. How can I answer
questions such as those listed below about the products in the warehouse?




How many products by each brand?
How many products by brand whose quantity is less than 10?
How many products expiration date after July 15, 2010?
How many products expired before 2010?
In a more general context, how do I perform operations such as the following?



Count the number of cells in a range containing numbers.
Count the number of blank cells in a range.
Count the number of nonblank cells in a range.
We often want to count the number of cells in a range that meet a given criterion. For example, if
a worksheet contains information about makeup sales, we might want to count the number of
sales transactions made by the salesperson named Omar, or the number of sales transactions that
occurred after June 10.
COUNTIF function syntax
The syntax of the COUNTIF function is COUNTIF(range,criterion).


Range is the range of cells in which you want to count cells meeting a given criterion.
Criterion is a number, date, or expression that determines whether to count a given cell in the
range.
The syntax of COUNTIFS (new in Microsoft Office Excel 2007) is
COUNTIFS(range1,criterion1,range2,criterion2,…,range_n,criterion_n).
COUNTIFS will count the number of rows for which the range1 entry meets criterion1, the
range2 entry meets criterion2, the range_n entry meets criterion_n, and so on. Thus,
COUNTIFS allows the criteria to involve more than one column or multiple conditions in one
column.
IF function
One of the most useful functions in Excel is the IF function. What it does is test a value in a
specific cell to see if that value meets a certain condition. If the value does meet the condition,
one result will happen, if false, a different action will occur.
Writing the IF function:
=IF(logical_test, value_if_true, value_if_false)
Like all functions or formulas in Excel, this function begins with the equal sign ( = ), and, like all
other functions and formulas, the answer goes in the cell where the equal sign is typed. Notice as
well that the different parts of the function inside the round brackets are separated by commas ( ,
).
Following the equal sign and the keyword “IF― is the “logical test―, which is a
question that can only have true or false as the answer. After the logical test are two values "value_if_true" and "value_if_false". One of these two values will be dislayed in the cell where
the function is written.
Which value gets displayed depends on the logical test. Recall that the logical test can only have
a true or false answer. If the answer is true, then the first value is displayed. If the answer is false,
then the second value is displayed.
IF Function example
=IF(D1 < 26, 100, 200)
Breaking the example down into its three parts we have:
logical test: D1 < 26, ("<" means less than)
value if true: 100
value if false: 200
The results of this function will be:


If the value in D1 is less than 26, the value shown will be 100.
If the value in D1 is NOT less than 26, the value shown will be 200.
Nested IF function
Nested IF Functions
A Nested IF function is when a second IF function is placed inside the first in order to test
additional conditions. "Nesting" IF functions increases the flexibility of the function by
increasing the number of possible outcomes.
For example, deductions from an employee's income usually depends on employee income. The
higher the income, the higher the deduction rate. We can use an IF function to determine what
the deduction rate will be.
For this example, if employee income is:

less than $29,701, the deduction rate is 15%

greater than or equal to $29,701, but less than $71,950, the deduction rate is 25%

greater than or equal to $71,950, the deduction rate is 28%
The first deduction rate is handled by the logic test and the value if true argument of the first IF
function. To do this, we write the beginning of the IF function as:
=IF(A5 < 29701, A5*15%,
To add the second and third deduction levels, we nest one IF function inside another. For
example:
=IF(A5<29701,A5*15%,IF(A5<71950,A5*25%,A5*28%))
The logic test of the Nested IF function, checks to see if a employee’s income is greater than or
equal to $29,701, but less than $71,950. If it is, the deduction rate is 25%. If the income is
greater than or equal to $71,950, the deduction rate is 28%. Additional rate changes could be
added another nested IF functions inside the existing function.
Note: there is no comma separator in 29,701 or 71,950 in the above example. This is because the
IF function uses the comma to separate the three sections of the IF function contained within the
round brackets.
If you use a comma as a separator in numbers greater than a thousand, Excel will give you an
error message saying you have too many arguments in your function.
Download