Presentation is loading. Please wait.

Presentation is loading. Please wait.

REACH CRC Professor Reinhardt

Similar presentations


Presentation on theme: "REACH CRC Professor Reinhardt"— Presentation transcript:

1 REACH CRC Professor Reinhardt
CIS 300 Test 1 Review REACH CRC Professor Reinhardt

2 Excel Functions Boolean Values IF and Nested IF ISBlank and IS Number
LARGE, SMALL and ROUND COUNTIF, SUMIF, and AVERAGEIF

3 Boolean values In computer science, Boolean data has two values: TRUE or FALSE. Boolean Values and Excel's Logical Functions Boolean values are used by Excel's Logical Functions, such as the IF function, AND function, and the OR function. For example, the first argument of the IF function is required to return a Boolean value as an answer

4 Boolean values That is to say the argument must always be a condition that is either TRUE or FALSE. If TRUE the function will perform one action. If FALSE the function will perform a different action. Sometimes, Boolean values are represented by the numbers " 1 " and " 0 ", with TRUE equaling 1 and FALSE equaling 0.

5 Boolean values Even though they can be read as numbers, many of Excel's functions, such as the SUM function, the MAX function and the MIN function, still ignore Boolean values. For example, the SUM function shown in the image above returns an answer of zero since it considers cells B1 to B4 to be blank.

6 =IF(logical_test, [value_if_true], [value_if_false])
The IF function Syntax: =IF(logical_test, [value_if_true], [value_if_false]) Arguments: logical_test Required Any value or expression that can be evaluated to TRUE or FALSE. value_if_true Optional The value that you want to be returned if the logical_test argument evaluates to TRUE. If logical_test evaluates to TRUE and the value_if_true argument is omitted (that is, there is only a comma following the logical_test argument), the IF function returns 0 (zero). To display the word TRUE, use the logical value TRUE for the value_if_true argument.

7 =IF(logical_test, [value_if_true], [value_if_false])
The IF function Syntax: =IF(logical_test, [value_if_true], [value_if_false]) Arguments: value_if_false Optional The value that you want to be returned if the logical_test argument evaluates to FALSE. If logical_test evaluates to FALSE and the value_if_false argument is omitted, (that is, there is no comma following the value_if_true argument), the IF function returns the logical value FALSE. If logical_test evaluates to FALSE and the value of the value_if_false argument is omitted (that is, in the IF function, there is a comma following the value_if_true argument), the IF function returns the value 0 (zero).

8 The IF function Description: Remarks: Errors:
The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE. Remarks: Up to 7 IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests. (2003) Up to 64 IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests. (2007) If any of the arguments to IF are arrays, every element of the array is evaluated when the IF statement is carried out. Errors: None

9 The IF function value_if_true [value_if_false]

10 Nested IF in Excel A nested IF statement says something like...
"If the answer is yes, do this. If the answer is no do this or this (depending on...“ Syntax: IF( condition1, value_if_true, IF( condition2, value_if_true, value_if_false ))

11 Nested IF What was the percentage grade you got on your last test? 75% You got a C Write a formula that would go in the Yellow box to display “You got a ____” for each grade possible A through F. Assume the blue box is cell F42. =IF(F42<60%,“You got an F",IF(F42<70%,"You got a D",IF(F42<80%,"You got a C",IF(F42<90%, "You got a B", "WOW you got an A!!!"))))

12 Nested IF What is the result of evaluating the following formula? =IF(MAX(D5:D9)>MIN(C5:C9),"D5",D7) A. 9 B. 16 C. D5 D. D7 E. None of the answers provided is correct

13 The LARGE function Syntax: =LARGE(array,k) Arguments: array Required
The array or range of data for which you want to determine the k-th largest value. k Required The position (from the largest) in the array or cell range of data to return.

14 The LARGE function Description: Remarks: Errors:
Returns the k-th largest value in a data set. Remarks: If n is the number of data points in a range, then LARGE(array,1) returns the largest value. If n is the number of data points in a range, then LARGE(array,n) returns the smallest value. Errors: #NUM! – If array is empty #NUM! – If k ≤ 0 #NUM! – If k is greater than the number of data points

15 3rd largest number in the numbers in columns A and B
=LARGE(array,k)

16 3rd largest number in the numbers in columns A and B
=LARGE(array,k) =LARGE(A2:B6

17 3rd largest number in the numbers in columns A and B
=LARGE(array,k) =LARGE(A2:B6,3)

18 3rd largest number in the numbers in columns A and B
List the numbers in descending order: 7 6 5 4 3 2 =LARGE(array,k) =LARGE(A2:B6,3) =5

19 The SMALL function Syntax: =SMALL(array,k) Arguments: array Required
The array or range of data for which you want to determine the k-th smallest value. k Required The position (from the smallest) in the array or cell range of data to return.

20 The SMALL function Description: Remarks: Errors:
Returns the k-th smallest value in a data set. Remarks: If n is the number of data points in a range, then SMALL(array,1) returns the smallest value. If n is the number of data points in a range, then SMALL(array,n) returns the largest value. Errors: #NUM! – If array is empty #NUM! – If k ≤ 0 #NUM! – If k is greater than the number of data points

21 4th smallest number in first column
=SMALL(array,k)

22 4th smallest number in first column
=SMALL(array,k) =SMALL(A2:A10

23 4th smallest number in first column
List the numbers in ascending order: 2 3 4 5 6 7 =SMALL(array,k) =SMALL(A2:A10,4)

24 4th smallest number in first column
List the numbers in ascending order: 2 3 4 5 6 7 =SMALL(array,k) =SMALL(A2:A10,4) =4

25 =ROUND(number, num_digits)
The ROUND function Syntax: =ROUND(number, num_digits) Arguments: number Required The number that you want to round. num_digits Required The number of digits to which you want to round the number argument.

26 The ROUND function Description: Remarks: Errors:
Rounds a number to a specified number of digits. Remarks: If num_digits is greater than 0 (zero), then number is rounded to the specified number of decimal places. If num_digits is 0, the number is rounded to the nearest integer. If num_digits is less than 0, the number is rounded to the left of the decimal point. Errors: None

27 The ROUND function

28 =COUNTIF(range, criteria)
The COUNTIF function Syntax: =COUNTIF(range, criteria) Arguments: range Required One or more cells to count, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. criteria Required A number, expression, cell reference, or text string that defines which cells will be counted. Criteria can be expressed as 32, ">32", B4, "apples", or "32".

29 The COUNTIF function Description: Remarks: Errors:
Counts the number of cells within a range that meet a single criterion that you specify. Remarks: See the Microsoft® Excel® help for additional remarks. Criteria are case insensitive Errors: None

30 The COUNTIF function

31 =SUMIF(range, criteria, [sum_range])
The SUMIF function Syntax: =SUMIF(range, criteria, [sum_range]) Arguments: range Required The range of cells that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. criteria Required The criteria in the form of a number, expression, a cell reference, text, or a function that defines which cells will be added. Criteria can be expressed as 32, ">32", B5, "32", "apples", or TODAY(). sum_range Optional The actual cells to add, if you want to add cells other than those specified in the range argument. Excel adds the cells that are specified in the range argument (the same cells to which the criteria is applied).

32 The SUMIF function Description: Remarks: Errors:
Sums the values in a range that meet criteria that you specify. Remarks: See the Microsoft® Excel® help for additional remarks. Errors: None

33 The SUMIF function

34 The AVERAGEIF function
Syntax: =AVERAGEIF(range, criteria, [average_range]) Arguments: range Required One or more cells to average, including numbers or names, arrays, or references that contain numbers. criteria Required The criteria in the form of a number, expression, cell reference, or text that defines which cells are averaged. average_range Optional The actual set of cells to average.

35 The AVERAGEIF function
Description: Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria. Remarks: If average_range is omitted, range is used. Cells in range that contain TRUE or FALSE are ignored. If a cell in average_range is an empty cell, AVERAGEIF ignores it. If a cell in criteria is empty, AVERAGEIF treats it as a 0 value. Errors: #DIV/0 – If range is a blank or text value. #DIV/0 – If no cells in the range meet the criteria.

36 The AVERAGEIF function
=AVERAGEIF(B2:B5,"<23000")

37 The AVERAGEIF function
=AVERAGEIF(B2:B5,"<23000") =14000

38 The AVERAGEIF function
=AVERAGEIF(A2:A5,"<95000")

39 The AVERAGEIF function
=AVERAGEIF(A2:A5,"<95000") =#DIV/0

40 The AVERAGEIF function
=AVERAGEIF(A2:A5,">250000",B2:B5)

41 The AVERAGEIF function
=AVERAGEIF(A2:A5,">250000",B2:B5) =24500

42 The ISBLANK and ISNUMBER Functions
Syntax ISBLANK(cell_reference) Returns TRUE logical value if the cell is blank and FALSE otherwise ISNUMBER(cell_reference) Returns TRUE logical value if the cell contains a number and FALSE otherwise

43 =AND(logical1, [logical2], ...)
The AND function Syntax: =AND(logical1, [logical2], ...) Arguments: logical1 Required The first condition that you want to test that can evaluate to either TRUE or FALSE. logical2, ... Optional Additional conditions that you want to test that can evaluate to either TRUE or FALSE, up to a maximum of 255 conditions. Microsoft® Excel® Logical Functions

44 The AND function Description: Remarks: Errors:
Returns FALSE if one or more arguments is FALSE Otherwise, all arguments must evaluate TRUE Remarks: Arguments must evaluate to logical values Arguments must be arrays or references that contain logical values Text and empty cells are ignored in arrays or references Errors: #VALUE – If no logical values exist in a specified range

45 The AND function – EXAMPLE 1

46 The AND function – EXAMPLE 2

47 The NOT function Syntax: =NOT(logical) Arguments: logical Required
A value or expression that can be evaluated to TRUE or FALSE.

48 The NOT function Description: Remarks: Errors:
Reverses the value of its argument. Remarks: If logical is FALSE, NOT returns TRUE if logical is TRUE, NOT returns FALSE Errors: None

49 The NOT function

50 Basic Terminology A form is a database object that is created from an existing table to make the process of entering data more user-friendly A query is the database equivalent of a question that is posed about data in a table (or tables). Queries can be designed to search multiple tables but these tables should be connected by a join operation. For the query: suppose a manager wants to know the names of the employees who are older than 55 years old. A query can be designed to search the employees table for the information. Join operation: the join operation links tables on the values in a field that they have in common. The common field acts as a “hinge” for the joined tables; when the query is run, the query generator treats the joined tables as one large table.

51 Types of Queries Select Query Append Query
Queries that answer a question “Selects” relevant data from database records Helps you get just the data you need in a Datasheet view Append Query Adds a record to the end of the table Works by selecting records from one or more data sources and copying them to an existing table

52 Types of Queries Update Query Delete Query
Designed to change data in records Often updates information in real time (think online purchases and updating the on-hand amount of that item) Begins as a “Select” query, then begins by clicking “update” Delete Query Deletes entire records from a table Works similar to update query (must start with select query)

53 Use Update or Delete? Use a delete query
Type of query When to use it Results Use a delete query To remove entire records (rows) from a table or from two related tables simultaneously. Delete queries remove all the data in each field, including the key value that makes a record unique Use an update query To delete individual field values from a table. Makes it easier to delete values by updating the existing values to either a null value (that is, no data) or a zero-length string (a pair of double quotation marks with no space between them).

54 Database Design Rules Rule 1: You do not need a table for the business
The database represents the entire business. Thus in the practice example* The library is not an entity. *practice problem at the end of tutorial A. Rule 2: Identify the entities in the business description In our example the entities are Members, employees and books.

55 Database design rules Rule 3: Look for relationships among the entities look for relationships between entities; one-to-many and many-to-many. In our example: one-to-many: a member can check out more than one book. Rule 4: Look for attributes of each entity and designate a primary key. Attributes of members: name, DOB, phone no., address, member ID card number …etc. Employees: name, # of hours worked, job title,…etc. Books: name, authors, type, status, member ID card number…etc. Primary Key Foreign key

56 Database Design Rules Rule 5: Avoid data redundancy
you should not include extra (redundant) fields in a table. Redundant fields take up extra disk space and lead to data entry errors because the same value must be entered in multiple tables. Rule 6: Do not include a field if it can be calculated from other fields A calculated field is made using the query generator as we will see later. ** You should realize the importance of accuracy, case sensitivity…etc in designing databases.

57 (Database Concepts) Which of the following terms is often used to refer to the columns shown in a database table? (select at least one, but no more than two answers) row data element metadata field record data type

58 (Database Concepts) A field within a database is defined as a single item of data that is common to all records and occurs as an individual _____ within a table. cell column row value entry

59 (Microsoft Access) The Report Wizard is an easy to use feature in Access that guides you through a series of questions and then generates a customized report based on the answers you provide. True False

60 (Microsoft Access) Which of the following types of fields is used to produce a value from an expression or function? Calculated AutoNumber OLE Object Indexed Number

61 (Microsoft Access) Which of the following objects provides a simple approach for less-experienced users to extract information from a database? (select at least one, but no more than two answers) Forms Macros Modules Queries Reports Tables

62 (Database Concepts) Because it is relatively common and everyone has one, the date of birth is often used as a primary key in a database table for identifying employees within a corporation. True False (Database Concepts) What is the term for a collection of related records, such as the scores for all of the students in a given section of CIS300? Field Character Item Table Query

63 THANK YOU FOR ATTENDING CIS TEST REVIEW SESSION


Download ppt "REACH CRC Professor Reinhardt"

Similar presentations


Ads by Google