Top Banner
Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Chapter 6 Advanced Functions

Copyright 2005 Radian Publishing Co.

Page 2: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.2/22

Contents

Chapter 6 Advanced Functions

6.1 Advanced Statistical Functions

6.2 Logical Functions

6.3 Lookup and Reference Functions

Page 3: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.3/22

Chapter 6 Advanced Functions

In this chapter, you will learn some more powerful functions, including

advanced statistical functions, logical functions, and lookup and

reference functions.

These functions involve comparing values and give a result based on a

certain criteria.

Page 4: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.4/22

6.1 Advanced Statistical Functions (1/4)

The advanced statistical functions that you have learnt are:

1. COUNTIF(range, criteria) counts the number of cells that meet the given criteria.

The criteria in SUMIF and COUNTIF is expressed as a string that

starts with a relational operator, such as =, <>, >, <, >= or <=.

Wildcards can be used in a criteria involving text: (?) represents

any character at the specified position; (*) represents any

combination of characters.

Page 5: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.5/22

6.1 Advanced Statistical Functions (2/4)

Table 6.1 Examples of criteria COUNTIF()

Page 6: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.6/22

6.1 Advanced Statistical Functions (3/4)

2. SUMIF(range, criteria, [sum_range]) adds the cells that meet the given criteria.

For SUMIF() with 2 arguments, values that meet the given criteria

will be summed.

For SUMIF() with 3 arguments, the first range of cells are used to

determine the criteria, the second range are cells which will be

added.

SUMIF() can only handle simple condition. For complicated conditions, you should use IF() function.

Page 7: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.7/22

6.1 Advanced Statistical Functions (4/4)

3. FREQUENCY(data, group) calculates how often numbers occur within a set of data, and then returns a vertical array of counts.

As FREQUENCY() returns multiple values, it is an array formula.

You need to press CTRL+SHIFT+ENTER instead of ENTER to

complete the entry.

For FREQUENCY(), the result represents the frequency of data

which are less than or equal to the group value.

Page 8: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.8/22

6.2 Logical Functions (1/3)

The logical functions that you have learnt are:

1. IF(logical_test, value_if_true, value_if_false) returns the value in the 2nd argument if the logical test is evaluated to be TRUE. Otherwise, the value in the 3rd argument would be returned.

When a condition has multiple alternatives, nested-if will be used.

For example, in grade conversion:

=IF(C3<30,"E",IF(C3<50,"D",IF(C3<70,"C",IF(C3<90,"B","A"))))

Page 9: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.9/22

6.2 Logical Functions (2/3)

2. AND(logical1,logical2, ...) returns TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.

3. OR(logical1,logical2,...) returns TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

4. NOT(logical) reverses the value of its argument.

Page 10: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.10/22

6.2 Logical Functions (3/3)

NOT(A1>A2) is the same as A1 <= A2

NOT(AND(A1=A2, B1=B2)) is the same as OR(A1<>A2, B1<>B2)

NOT(OR(A1=A2, B1=B2)) is the same as AND(A1<>A2, B1<>B2)

Page 11: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.11/22

6.3 Lookup and Reference Functions (1/12)

The lookup and reference functions that you have learnt are:

1. VLOOKUP(lookup_value, table, column_num, type) searches for a value in the first column of a table and returns a value in the same row from another column in the table.

If the 4th argument – “type” is FALSE (or 0), the lookup will carry

out exact match.

In range lookup, values in the first column of the table (2nd

argument) must be sorted in ascending order.

Page 12: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.12/22

6.3 Lookup and Reference Functions (2/12)

Page 13: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.13/22

6.3 Lookup and Reference Functions (3/12)

Fig.6.15 Examples of VLOOKUP() using exact match (type = 0)

Page 14: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.14/22

6.3 Lookup and Reference Functions (4/12)

2. HLOOKUP(lookup_value, table, row_num, type) searches for a value in the top row of a table and returns a value in the same column from another row in the table. “type” is zero for exact match.

If the 4th argument – “type” is FALSE (or 0), the lookup will carry

out exact match.

In range lookup, values in the first column of the table (2nd

argument) must be sorted in ascending order.

Page 15: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.15/22

6.3 Lookup and Reference Functions (5/12)

Page 16: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.16/22

6.3 Lookup and Reference Functions (6/12)

Fig.6.26 Example of HLOOKUP() with approximate match

Page 17: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.17/22

6.3 Lookup and Reference Functions (7/12)

3. LOOKUP(lookup_value, table) examines the shape of the table and determines whether you want to return data from a row (similar to HLOOKUP) or from a column (similar to VLOOKUP).

If the table has more columns than rows, LOOKUP searches in the

first row. Otherwise, it search in the first column.

Page 18: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.18/22

6.3 Lookup and Reference Functions (8/12)

Fig.6.27 Example of LOOKUP() with 2 arguments. Matching result in last row/column of table is returned

Page 19: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.19/22

6.3 Lookup and Reference Functions (9/12)

4. INDEX(table, row_num, column_num) returns the value of a cell at the intersection of a specified row and column.

Fig.6.29 Example of INDEX() function

Page 20: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.20/22

6.3 Lookup and Reference Functions (10/12)

5. MATCH(lookup_value, table, type) returns the relative position of an type in a table that matches a specified value. “type” is zero for exact match.

INDEX is usually used with MATCH to provide a fully automated

search (without the need to provide the column number to return).

Page 21: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.21/22

6.3 Lookup and Reference Functions (11/12)

Fig.6.30 Comparing VLOOKUP(), LOOKUP() and INDEX()

Page 22: Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.

Copyright 2005 Radian Publishing Co.22/22

6.3 Lookup and Reference Functions (12/12)

In FREQUENCY(), the result represents the frequency of data which

are less than or equal to the group value specified by you. While in

VLOOKUP() and HLOOKUP, Excel searches for data which are greater

than or equal to the value specified in the table.