ramping up with excel handout

8
Using Excel to Ramp up Assessment and Testing Capabilities Jordan Svien, Hiroshima Bunkyo Women’s University 1. =IF Overview: An IF formula tells Excel to check if a certain condition is met. If it is, it will return one result (which can be a number, text, or even another formula), and if it is not met, it will return a different result. IF formulas can be nested, meaning that multiple branching conditions can be checked for. Syntax: =if(condition,result 1,result 2) Example 1: =if(A1=5, "Y","N") If cell A1 is equal to 5, display Y, otherwise display N. Example 2: =if(A1=B1, "SAME","DIFFERENT") If cell A1 is equal to cell B1, display SAME, otherwise display DIFFERENT. Example 3: =IF(A1>100%,100%,A1) If A1 is larger than 100%, display 100%, otherwise display the value currently in A1. Example 4: =IF(A1="YES",B1+5%,B1) If the text in A1 displays YES, add 5% to the value in cell B1, otherwise display the original cell B1 value. Example 5: =IF(A1>20,"A",IF(A1>10,"B","C")) If A1 is larger than 20, display A. If not, then check to see if A1 is instead larger than 10, and if so, display B. If not, display C. IF Example 4 demonstrated Column A Column B (Formula) Column B (Result) 1 95% =if(A1>100%,100% ,A1) 95% 2 102% =if(A2>100%,100% ,A2) 100% 3 87% =if(A3>100%,100% ,A3) 87% 4 76% =if(A4>100%,100% ,A4) 76%

Upload: jordan-svien

Post on 10-Apr-2017

87 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Ramping Up with Excel Handout

Using Excel to Ramp up Assessment and Testing CapabilitiesJordan Svien, Hiroshima Bunkyo Women’s University

1. =IFOverview:

An IF formula tells Excel to check if a certain condition is met. If it is, it will return one result (which can be a number, text, or even another formula), and if it is not met, it will return a different result.

IF formulas can be nested, meaning that multiple branching conditions can be checked for.

Syntax:

=if(condition,result 1,result 2)

Example 1: =if(A1=5, "Y","N") If cell A1 is equal to 5, display Y, otherwise display N.

Example 2: =if(A1=B1, "SAME","DIFFERENT") If cell A1 is equal to cell B1, display SAME, otherwise display DIFFERENT.

Example 3: =IF(A1>100%,100%,A1) If A1 is larger than 100%, display 100%, otherwise display the value currently in A1.

Example 4: =IF(A1="YES",B1+5%,B1) If the text in A1 displays YES, add 5% to the value in cell B1, otherwise display the original cell B1 value.

Example 5: =IF(A1>20,"A",IF(A1>10,"B","C")) If A1 is larger than 20, display A. If not, then check to see if A1 is instead larger than 10, and if so, display B. If not, display C.

IF Example 4 demonstrated Column A Column B (Formula) Column B

(Result)1 95% =if(A1>100%,100%,A1) 95%2 102% =if(A2>100%,100%,A2) 100%3 87% =if(A3>100%,100%,A3) 87%4 76% =if(A4>100%,100%,A4) 76%5 104% =if(A5>100%,100%,A5) 100%

Example Usage:

IF can be used to display messages when a cell hits a certain condition. For example, if a student has accumulated more than X absences, an IF generated message can appear to warn that the student is close to failing a course.

IF can also be used to determine whether two rows or columns of data are identical or not, especially when the data is complicated and numerous. Additionally, IF can be used to prevent number totals from going above maximum allowed values such as when grading curves are present or bonus points have been allocated.

IF is also vital in making toggle switches, where the text in a cell referenced in the condition can change several numbers or functions in the spreadsheet. In this way, a well-made IF statement can function as an on/off switch for a single cell or group of cells to behave in different ways!

Page 2: Ramping Up with Excel Handout

Jordan’s Thoughts:

IF is one of the most fundamental Excel formulas. The ability to create branching conditions that themselves may contain their own formulas is exceedingly convenient. This should be one of the first formulas to be learned and mastered.

One tricky note is the opening and especially closing of parentheses in the formula bar. It can be difficult to remember how many you need, which can get frustrating when Excel returns an error and doesn’t tell you where you’ve made it.

2. =COUNTIF and =COUNTIFSOverview: COUNTIF tells you the number of cells in a group of cells that match a specified text or numerical value. COUNTIFS lets you set multiple conditions (that span parallel rows or columns) and find how many cells match all of the specified conditions.

Syntax: =COUNTIF(range,value)

=COUNTIFS(range 1,value 1,range 2,value 2…)

Example 1: =COUNTIF(A1:A10,3) Count how many times the number 3 is found in the cells A1 through A10.

Example 2: =COUNTIF(A1:A10,B1) Count how many times the value (number or text) in B1 is found in the cells A1 through A10.

Example 3: =COUNTIFS(A1:A10,"blue",B1:B10, "green") Count how many pairs of cells within A1 to B10 have BOTH “blue” in column A1-A10 and “green” in column B1-B10.

Example 4: =COUNTIFS(A1:A10,A21,B1:B10,B20) Count how many pairs of cells within A1 to B10 have BOTH the value of A21 in column A1-A10 and the value of B20 in column B1-B10.

COUNTIFS Example 4 demonstrated

Example Usage:

Both COUNTIF and COUNTIFS can be used to quickly summarize data by seeing how many times each value or pairs of values occurs in an array. Combined with RANK, you can quickly know the most common number or text value in a set.

Because you can reference cells as the searched value, COUNTIFS is one Excel’s most convenient formulas. It is extremely simple and fast to setup a mini-table summary of a data set, as in the example below that searches for class number and grade (pass or fail) within a data set of 10 rows, with the class data found in column A and grade data found in column B.

Column A (Class) Column B (Grade)

Row 1 1 PASS

Row 2 1 FAIL

Row 3 1 PASS

Row 4 1 PASS

Row 5 1 PASS

Row 6 2 FAIL

Row 7 2 PASS

Row 8 2 PASS

Row 9 2 FAIL

Row 10 2 PASS

Column A Column B Column C← Column B Explanation

← Column B Result

← Column C Explanation

← Column C Result

Row 20

Grade → Class ↓ PASS FAIL

Row 21 1

=COUNTIFS (A1:A10

,A21,B1:B10,B20)

=COUNTIFS (A1:A10

,A21,B1:B10,C20)

Counts how many times BOTH A21 (1) is found within A1:A10

and B20 (PASS) is found within B1:B10.

4

Counts how many times BOTH A21 (1) is found within A1:A10

and C20 (FAIL) is found within B1:B10.

1

Row 22 2

=COUNTIFS (A1:A10

,A22,B1:B10,B20)

=COUNTIFS (A1:A10

,A22,B1:B10,C20)

Counts how many times BOTH A22 (2) is found within A1:A10

and B20 (PASS) is found within B1:B10.

3

Counts how many times BOTH A22 (2) is found within A1:A10

and C20 (FAIL) is found within B1:B10.

2

Page 3: Ramping Up with Excel Handout

Jordan’s Thoughts:

In a data set as small as the one above, you could of course just LOOK at the data and understand the counts, but in a lengthy and multivariate data set, COUNTIFS is a counting lifesaver.

3. =RAND and =RANDBETWEENOverview: RAND and RANDBETWEEN create random numbers in a cell. RAND creates a random decimal between 0 and 1, and RANDBETWEEN returns an integer between two set values.

Syntax: =RAND()

=RANDBETWEEN(low number,high number)

Example 1: =RAND() make a random number between 0 and 1 (i.e. .873902)

Example 2: =RANDBETWEEN(1, 10) make a random integer between (and including) 1 and 10

Example 3: =RANDBETWEEN(A1,B1) make a random integer between (and including) the values in A1 and B1.

RANDBETWEEN Example 3 DemonstratedColumn A Column B Column C Formula Column C Value

(example)1 1 10 =RANDBETWEEN(A1,B1) 72 11 20 =RANDBETWEEN(A2,B2) 203 21 30 =RANDBETWEEN(A3,B3) 22

Example Usage:

RAND and RANDBETWEEN are instrumental in the creation of random quizzes and random question selection, especially when RAND is paired with RANK.

RANDBETWEEN can also be used to simulate a dice roll or a slot machine or to set the initial parameters of an exercise that requires unique numerical values.

Jordan’s Thoughts:

RAND and RANDBETWEEN are actually a lot more powerful than they first appear. It is the building block to make mixed review worksheets, automatic student groups, lotteries, or quizzes.

4. =RANKOverview: Rank looks at the value in a cell and compares it to the values of a group of other cells that usually include the initial cell. The formula tells you the relative position of the searched value compared to the other values in the group.

Syntax: =RANK(cell,cell range,order)

Note: The "order" is either 0 (descending) or 1 (ascending). Descending will rank numbers from big to small, while ascending will rank numbers from small to large.

Example 1: =RANK(A1,A1:A5,0) This will return the relative placement of A1 when compared to all numbers A1 to A5. If 1 is returned, then A1 is the biggest number of that group.

RANK Example 1 DemonstratedColumn A Column B Formula Column B

Page 4: Ramping Up with Excel Handout

Value1 45 =RANK(A1,A1:A5,0

)1

2 20 =RANK(A2,A1:A5,0)

3

3 11 =RANK(A3,A1:A5,0)

4

4 33 =RANK(A4,A1:A5,0)

2

5 6 =RANK(A5,A1:A5,0)

5

Example 2: =RANK(A1,A1:A5,1) This will return the relative placement of A1 when compared to all numbers A1 to A5. If 2 is returned, then A1 is the second smallest number of that group.

RANK Example 2 DemonstratedColumn A Column B Formula Column B

Value1 .25 =RANK(A1,A1:A5,1

)2

2 .50 =RANK(A2,A1:A5,1)

4

3 .66 =RANK(A3,A1:A5,1)

5

4 .13 =RANK(A4,A1:A5,1)

1

5 .44 =RANK(A5,A1:A5,1)

3

Example Usage:

RANK can let you see who scored the highest or lowest on an exam, or it can be used to remove the high and/or low values from a data set to control for outliers or create curved grades. When combined with RAND, RANK lets you make sense of randomized lists of numbers, which can later become question index numbers for randomly generated quizzes.

Jordan’s Thoughts:

Although data can be sorted and/or filtered to achieve similar results to RANK, it can convenient to have the relative ranking of a set of values displayed, especially when combined with color scale conditional formatting.

5. =VLOOKUPOverview: VLOOKUP is used to retrieve data from a data set. It allows you to create an index of data and then retrieve specified data from the index in another place. It works by finding a specified piece of data in an index and then returning the value in a specified number of columns to the right of the matching data. The specified data can be a number, a piece of text, or a referenced cell.

Syntax: =VLOOKUP(reference value,index array,column index,0)

Explanation of Syntax:

The reference value is a piece of data that you want to search for in your data index. In creating your index array, highlight the index so that the first column of cells contains your matching reference value

Page 5: Ramping Up with Excel Handout

somewhere in it and drag over to the right end of your desired index. The column index is the distance in columns to the right of the first column in your index to the data you wish to retrieve, with the first column counting as 1. VLOOKUP requires a final comma and zero after the column index and before the final parenthesis.

Example 1: =VLOOKUP(3,A1:G5,7,0) In the data index A1:G5, find the value “3” in the A column and retrieve the value 7 columns over (i.e. the value in the corresponding G column).

Example 2: =VLOOKUP("Kenji",A1:G5,3,0) Find “Kenji” in column A of the data set A1:G5. Then retrieve the value 3 columns over (i.e. the value in the corresponding C column).

Column A Column B

Example 3: =VLOOKUP(J1,A1:G5,5,0) In the data index A1:G5, find the value currently listed in J1 in the A column and retrieve the value 5 columns over (i.e. the value in the corresponding E column).

Example 4: =VLOOKUP("Kenji",A1:K5,VLOOKUP("Listening",A11:B15,2,0),0) Find “Listening” in column A of the data set A11:B20 and retrieve the value 2 columns over (in column B). Then find “Kenji” in the data set A1:K10 and retrieve the value X columns over, where X was the number you found in the prior step.

Example Usage:

VLOOKUP is fundamental in nearly all advanced Excel operations. It can be used to send individual student scores into a progress report template, used in tandem with RAND and RANK to make vocabulary quizzes, or simply be used to instantly look up data or pull data from one data set to another. Instead of copying and pasting values after sorting two spreadsheets in similar fashions, simply use VLOOKUP to guarantee no errors or data corruption (such as if one of the two spreadsheets is missing a row).

Jordan’s Thoughts:

VLOOKUP is the king of formulas and an absolute must-learn for anyone who uses Excel professionally. The power and convenience to quickly recall data from a larger set cannot be overstated. VLOOKUP allows you to go from simply displaying an index of data to manipulating it into professional databases or documents.

6. =IFERROROverview: IFERROR allows you to determine what happens if a formula would normally result in an error. In these cases, you can display alternative text or numbers or even change the formula to something else entirely.

Syntax:

=IFERROR(value,value if error)

Example 1: =IFERROR(A1/A2,"") Divide A1 by A2. If the value results in an error (such as when A2 equals 0), display nothing.

Page 6: Ramping Up with Excel Handout

Example 2: =IFERROR(VLOOKUP(G1,A:B,2,0), "") Do a Vlookup to look up the value G1 within column A and return the adjacent value in column B. If G1 cannot be found in column A, display nothing.

Example 3: =IFERROR(VLOOKUP(G1,A:B,2,0),VLOOKUP(G1,D:E,2,0)) Do a Vlookup to look up the value G1 within column A and return the adjacent value in column B. If G1 cannot be found in column A, then repeat the process but instead look for G1 in column C and return the adjacent value in column D.

Example Usage:

Instead of displaying errors such as #N/A, DIV/0!, or #VALUE!, IFERROR gives you the option to display nothing (written as "") instead, which makes for cleaner spreadsheets, especially when you know there will be an error.

As with IF, IFERROR formulas can be nested so that several different formulas that may result in errors can be overridden until one works, allowing you to conveniently use the same formula in different cells when one size does not fit all.

If you are making student progress reports and a student has missed an assessment or has an incomplete portion of a grade that would otherwise be displayed in a cell as an error, IFERROR can be used to display a customized message about the missing data or even to leave the cell blank.

Jordan’s Thoughts:

This formula can make your spreadsheet look a lot cleaner instead of error messages everywhere when a formula is not guaranteed to result in a value (such as a randomized vocabulary list). The ability to stack multiple formulas together makes this a great tool and saves you from having to customize cells within the same columns with different formulas to meet their conditions (such as when different data is stored in different places or certain text or numbers require special formulas).

Special Thanks to Jonathan Oakdale of 3SI (Third Sector Intelligence) for imparting his immense Excel knowledge and upping my work productivity 1000%.