Ex - National Seminars Training

12
Mastering Excel ® Functions & Formulas COPYRIGHT NATIONAL SEMINARS TRAINING. ALL RIGHTS RESERVED.

Transcript of Ex - National Seminars Training

Page 1: Ex - National Seminars Training

Mastering Excel®

Functions & Formulas

COPYRIGHT NATIONAL SEMINARS TRAINING. ALL RIGHTS RESERVED.

Page 2: Ex - National Seminars Training

2

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

Financial and Statistical Function Overview

Financial and Statistical Function Overview• Financial: PMT, FV, and RATE functions

• Statistical: AVERAGE, MAX, MIN, MODE, MEDIAN

• Others: STDEV, VAR, PERCENTILE, QUARTILE, RANK, LARGE

The IF Function• =IF(Logical_Test,[value_if_true],[value_if_false])

Conditional operators: < > = >= <= < >

In this example, commission will be paid if “Gross Profit” exceeds 35% of the sale.

• =IF(H7>C7*0.35,C7*0.1,"No Bonus")

The Nested IF Function• =IF(Logical_Test,[value_if_true],[value_if_false])

The logic is the same for both IF and Nested IF. In this example, commission levels are paid at 10% if the gross profit is greater than 35% of the sale and 5% if the gross profit is greater than 25% of the sale.

• =IF(H7>C7*0.35,C7*0.1,IF(H7>C7*0.25,C7*0.05,0))

Page 3: Ex - National Seminars Training

3

PARTICIPANT NOTEBOOK

WTEXF092214

Using IF — AND• =IF(AND(condition1,condition2,…),true,false)

Exp. paying commission on sales made in the “Central” region AND “Gross Profit” exceeds 25% of the sale

• =IF(AND(H7>C7*0.25,E7="Central"),C7*0.05,0)

Using IF — OR• =IF(OR(condition1,condition2,…),true,false)

Exp. paying commission on sales made in the “Central” region OR “Gross Profit” exceeds 50% of the sale• =IF(OR(H7>C7*0.5,E7="Central"),C7*0.05,0)

Page 4: Ex - National Seminars Training

4

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

The VLOOKUP and HLOOKUP Functions• Logic, =VLOOKUP(lookup_value,table_array, column_Index_Num,[range_lookup])

This searches for a value in the first column of atable array and returns a value in the same rowfrom another column in the table array.

In the example below, a Student ID is provided.In cell D15 [lookup_value], the Student ID iscompared to a list $A$4:$D$12 [table_array].The number 2 in the formula represents thesecond column, which contains the “FirstName” [column_index_num]. FALSE[range_lookup] is looking for an exact match;when a match is found, the information fromthe table array populates the “First Name” fieldin cell B17.

=VLOOKUP(I1,$A$4:$A$12,2,FALSE)

To find an approximate match, the example below uses a VLOOKUP to compare the weekly quizscore in a table array to populate a cell with a message.

• =VLOOKUP(B19,Scores_T,2,TRUE)

A False statement will return an exact match; a True statement will return an approximate match. Thestudent scored a 79% on the quiz, and the appropriate message was populated in the cell from thetable array to the right.

Note: In the first VLOOKUP, absolute cell references were used; in the second example a tablename was used. It is not necessary to use table names, but absolute cell references are requiredwhen building VLOOKUPs.

Page 5: Ex - National Seminars Training

5

PARTICIPANT NOTEBOOK

WTEXF092214

The MATCH Function• MATCH Logic =MATCH(lookupValue,lookup_array,[matchType])

The MATCH function is used to find a specific position in a table array and returns a column or row number.

MATCH can be used to compare two lists to determine duplicate values, or new values. In the examplebelow, MATCH was used to find returning students from one semester to the next. Two lists are beingcompared, and a row number will be returned where a match is found.

An IFERROR and IF statement were used to provide a text value of “RS” when a match was made, and“New Student” was returned when no match was found.

• =IFERROR(IF(MATCH(A6,$A$4:$A$12,0),"RS"),"New Student")

Match Type = 0

Returns the position in A4:A12 of thefirst value that exactly matchesLookupValue

Values in the lookup table can be in anyorder.

Match Type = 1

Returns the position of the largestvalue in A4:A12 <= the LookupValue

Values in the lookup table must be inascending order.

Match Type = -1

Returns the position of the smallestvalue in A4:A12 >= the LookupValue

Values in the lookup table must be indescending order.

Page 6: Ex - National Seminars Training

6

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

The INDEX Function• =INDEX(array,row_number,column_Number)

• =INDEX(D3:M9,6,3) returns content of the cell at the intersection of the sixth row and third column of the range D3:M9.

Note: INDEX by itself is useful, but when combined with MATCH becomes very flexible.

INDEX and MATCH Together

• =INDEX(array,MATCH(lookup_value,lookup_array,[match_type]),[column_num])

• =INDEX(D2:M9,Match(A2,C2:C9,0),3)

• =INDEX(array, row_num,MATCH(lookupValue,Lookup_array, [matchType]))

• =INDEX(D2:M9,7,Match(A2,C2:C9,0))

Example: In the screen shot below, a value is interred in cell B15. The value in cell B15 is compared to a rangeof information in cells A4:A12. If a MATCH is found, a row number is given. To find the column number, a valueis added to cell D15. This information is compared to the values shown in cells E3:K3. When an exact match isfound, a column number is returned. Having both a row and column number, a weekly test score is displayedfrom the table D4:K12.

=INDEX(D4:K12,MATCH(D15,A4:A12,0),MATCH(B15,D3:K3,0))

Page 7: Ex - National Seminars Training

7

PARTICIPANT NOTEBOOK

WTEXF092214

Using COUNTIF and SUMIF

To count or sum a criteria range, use COUNTIF or SUMIF. In the example above, all sales that match thecriteria are totaled. The name of the salesperson in Column M:M is compared to the names found incolumn B:B. When a match is found, the commission in column J:J is totaled and shown in the cell tothe left of the name in column M:M

• SUMIF Logic =SUMIF(Range,Criteria,[SumRange])

• =SUMIF(B:B,M6,J:J)

Other COUNTIF and SUMIF Examples

• =COUNTIF(E2:E90,"=Colorado")Counts how many cells in the range E2:E90 equal "Colorado"

• =COUNTIFS(E:E,"=Colorado",G:G,100)Counts how often both entries in column E equal "Colorado" and column G = 100

• =SUMIF(K:K,"=Oregon",J:J)Totals all column J values when the corresponding column K entry equals "Oregon"

• =SUMIFS(F:F,K:K,"=Ohio",M:M,5)Totals all values in column F when the corresponding column K entry equals "Ohio" and the corresponding column M entry = 5

• =AVERAGEIF(K:K,"=Ohio",J:J)Averages all column J values when the corresponding column K entry equals "Ohio"

• =AVERAGEIFS(F:F,K:K,"=Kentucky",Q:Q,7)Averages all column F values when the corresponding column K entry equals "Kentucky" and thecorresponding column Q entry = 7

Page 8: Ex - National Seminars Training

8

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

Array Formulas

Array formulas are single calculations carried out inmultiple cells using different data each time.

In this example, cell B3 is multiplied by cell C3. Thiscontinues 11 more times until the function reaches the bottom of the range. The “Products” are thentotaled to give the answer $29,960.00, which is shown in cell B15.

Array formulas handle multiple cells at once usingspecial syntax. Conclude Array formulas withCtrl+Shift+Enter.

Note: Range orientation and size need to be the same,and do not type the braces; they appear automaticallywhen you press Ctrl+Shift+Enter.

Simple Applications

• {=MEDIAN(IF(F:F=1,K:K))}Finds the Median value for Column K entries when Column F = 1

• {=SUM(B2:B88*C2:C88)}Adds the products B2*C2, B3*C3, B4*C4 … B88*C88

• {=SUM(SQRT(K2:K20))}Adds the square roots of each of the cells in the range K2:K20

Complex Applications

• {=SUM(1/COUNTIF(A2:A999,A2:A999))}Counts the number of unique entries in A2:A999

Condense Long IF Functions Substantially

• Instead of:=IF(AND(B3=B2,C3=C2,D3=D2,E3=E2,F3=F2,G3=G2,H3=H2,I3=I2,J3=J2),"Duplicate"," Unique")

• Use: {=IF(B3:J3=B2:J2,"Duplicate","Unique")

Special Array Functions

• FREQUENCY: Creates a frequency count based on a table of break points

• TRANSPOSE: Transposes a range while linking all cells back to the copied range

• TREND and GROWTH: Creates straight lines and exponential lines based on regression analysis

Page 9: Ex - National Seminars Training

9

PARTICIPANT NOTEBOOK

WTEXF092214

Date Formulas and Functions

Calculating Date/Time Differences and Future Dates

WEEKDAY

• =WEEKDAY(G3)Calculates day of the week for the date in cell A3 — returns a value of 1(Sunday)through 7 (Saturday)

NETWORKDAYS

• =NETWORKDAYS("1/20/10","6/3/10",F2:F8)Calculates the number of working days from 1/20/10 through 6/3/10, omittingany dates found in a list of holidays in cells F2:F8 — returns the value 95

WORKDAY

• =WORKDAY("1/20/10",100,F2:F8)Calculates the completion date based on a starting date of 1/20/10 for a project100 days in length, but not counting the days indicated in F2:F8 — returns thedate 6/11/10

Page 10: Ex - National Seminars Training

10

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

• ROUND: Alters the results of formulas to round results to the nearest power of10 — often to two or zero decimals= ROUND(B3*N1+B3,2) — Rounds the calculation to the nearest two

decimal places

= ROUND(B3*N1+B3,0) — Rounds the calculation to the nearest whole number

• ROUNDUP: Rounds up to the next level= ROUNDUP(C3*D4,1) — If C3*B4 equals 7.32, changes result to 7.4

• ROUNDOWN: Rounds down to the next level= ROUNDDOWN(F3*G4,1) — If F3*G4 equals 6.18, changes result to 6.1

• MROUND, CEILING, FLOOR: Allows rounding to any value, not just powers of 10

Rounding Functions

Page 11: Ex - National Seminars Training

11

PARTICIPANT NOTEBOOK

WTEXF092214

1. TRIM: Eliminates leading and trailing spaces, as well as reducing multiple consecutive inner spaces to one space

•=TRIM(G3) — When G3 contains "North Dakota", returns the text string "North Dakota"

2. PROPER: Returns text with the first letters of all words in uppercase, others in lowercase

3. UPPER: Returns text with all letters of all words in uppercase

4. LOWER: Returns text with all letters of all words in lowercase

5. LEFT, RIGHT: Extracts data from the left or right side of a cell

• =LEFT(G3,4) extracts the first four characters from the left side of cell G3.

• =RIGHT(H3,3) extracts the last three characters from the right side of cell H3.

6. MID: Extracts a selected number of characters starting at a specific character position

• =MID(G7,4,6) extracts six characters from cell G7, starting at character position 4.

7. Concatenation symbol (&): Puts together data from other cells and/or data strings

• =G3&", "&H3 creates an entry consisting of the data from cell G3, then a comma and space, and then the data from H3.

Financial and Statistical Function OverviewFinancial Functions

• PMT: The loan payment function

• FV and RATE functions

Statistical Functions

• Popular functions: AVERAGE, MAX, MIN, MODE, MEDIAN

• Others: STDEV, VAR, PERCENTILE, QUARTILE, RANK, LARGE

Text Functions

Page 12: Ex - National Seminars Training

12

MASTERING EXCEL ® FUNCTIONS & FORMULAS

WTEXF092214

Recommended Resources

CD-ROMs

Mastering Microsoft® Excel® Macros

Microsoft® Office® 2010 (CD set)

Books

Microsoft® Access® 2010 Bible

Microsoft® Excel® 2007 Bible

Microsoft® Excel® 2007 Formulas

Microsoft® PowerPoint® 2010 Bible

Microsoft® Word® 2010 Bible