Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell...

30
Basic Excel Workshop I November 14, 2019

Transcript of Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell...

Page 1: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Basic Excel Workshop I

November 14, 2019

Page 2: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Logical Operators

Operator Meaning Example

= Equal to =A1=12

<> Not equal to =A1<>9

> Greater than =A1>100

< Less than =A1<100

>= Greater than or equal to =A1>=70

<= Less than or equal to =A1<=70

Page 3: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Relative Cell Reference

• Excel default• When copied across multiple

cells, they change based on the relative position of rows and columns.

• For example, if you copy the formula =A2*5 from row 2 to row 3, the formula will become =A3*5.

Page 4: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Absolute Cell Reference

• Unlike relative references, absolute references do not change when copied or filled.

• Used to keep a row and column constant

• Designated in a formula by the addition of a dollar sign ($)

Page 5: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Mixed Cell Reference

• Can precede the column reference or row reference

• For example, • A$2: the row does not

change when copied• $A2: the column does not

change when copied

Page 6: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Keyboard ShortcutsShortcut Windows/PC Mac

Jump to end of data table Ctrl + (Up/Down/Left/

Right)

Cmd + (Up/Down/Left/

Right)

Jump to end of data table + highlight entire region

Ctrl + Shift + (Up/Down/Left/

Right)

Cmd + Shift + (Up/Down/Left/

Right)

Cycle through cell references F4 Cmd + T

Display formula + highlight inputs F2 Ctrl + U

Page 7: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

SUM and PRODUCTFunctions

Summary: The SUM function returns the sum of selected values. The PRODUCT function returns the product of selected numbers.

Purpose: Add/multiply selected numbers

Return Value: The sum/product of selected values

Syntax: =SUM (number1, [number2], [number3],…)=PRODUCT (number1, [number2], [number3],…)

Arguments:• number1 – The first number or range to add/multiply• number2 – [optional] The second number or range to

add/multiply• numberX – [optional] The Xth number or range to

add/multiply

Page 8: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

SUM and PRODUCT function examples

Page 9: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

IF Function

Summary: The IF function can perform a logical test and return one value for a TRUE result and another for a FALSE result.

Purpose: Test for a specific condition

Return Value: The values you supply for TRUE or FALSE

Syntax: =IF (logical_test, [value_if_true], [value_if_false])

Arguments:• logical_test – An expression that evaluates to TRUE or FALSE• [value_if_true] – [optional] The value to return when logical_test

evaluates to TRUE• [value_if_false] – [optional] The value to return when

logical_test evaluates to FALSE

Page 10: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=IF(logical_test, [value_if_true], [value_if_false])

Page 11: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Questions 1a and 1b in the “Excel Functions” sheet.

Page 12: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

VLOOKUP Function

Summary: The VLOOKUP function looks for and retrieves data from a specific column in a table.

Purpose: Look up a value in a table by matching on the 1st column

Return Value: The matched value from a table

Syntax: =VLOOKUP (value, table, col_index, [range_lookup])

Arguments:• value – A value to look for in the first column of a table• table – The table from which to retrieve a value • col_index – The column in the table from which to retrieve a

value• [range_lookup] – [optional] TRUE = approximate match

(default). FALSE = exact match

Page 13: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=VLOOKUP(value, table, col_index, [range_lookup])

Exact match

Page 14: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=VLOOKUP(value, table, col_index, [range_lookup])

Approximate match(only works when the table is sorted in ascending order & returns the value that is closest to but not greater than the lookup value)

Page 15: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Question 2 in the “Excel Functions” sheet.

Page 16: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

COUNTIF and SUMIFFunctions

Summary: The COUNTIF function counts the number of cells that meet a single criteria. The SUMIF function returns the sum of cells that meet the supplied criteria.

Purpose: Count/sum numbers in a range that match criteria

Return Value: A count/sum of supplied values

Syntax: =COUNTIF (range, criteria)=SUMIF (range, criteria, [sum_range])

Arguments:• range – The range of cells that you want to apply criteria

against• criteria – The criteria used to determine which cells to add• [sum_range] – [optional] The cells to add together. If omitted,

the cells in range are added together instead

Page 17: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=COUNTIF(range, criteria)

Page 18: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=SUMIF(range, criteria, [sum_range])

Page 19: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Questions 3 and 4 in the “Excel Functions” sheet.

Page 20: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

COUNTIFS and SUMIFSFunctions

Summary: The COUNTIFS and SUMIFS functions perform the same tasks as their COUNTIF and SUMIF counterparts, but they allow multiple criteria.

Purpose: Count/sum numbers that match multiple criteria

Return Value: The number/sum of cells that meet all criteria

Syntax: =COUNTIFS (range1, criteria1, [range2], [criteria2],…)=SUMIFS (sum_range, range1, criteria1, [range2], [criteria2],…)

Arguments:• sum_range* – The range to be summed• range1 – The first range to evaluate• criteria1 – The criteria to use on range1• [range2] – [optional] The second range to evaluate• [criteria2] – [optional] The criteria to use on [range2]

Page 21: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

=COUNTIFS(range1, criteria1, [range2], [criteria2],…)=SUMIFS(sum_range, range1, criteria1, [range2], [criteria2],…)

Page 22: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Questions 5a and 5b in the “Excel Functions” sheet.

Page 23: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

PivotTables

What is a PivotTable?

• You can think of a PivotTable as a report.

• It provides an interactive view of your data.

• You can look at the same data from many perspectives.

• You can group data into categories, break down data into years and months, filter data to include or exclude categories, and even build charts.

Page 24: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Questions 1a and 1b in the “PivotTable & Calculated Field”

sheet.

Page 25: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

• Useful for aggregate-level calculations

• For example, we can create a calculated Field4 by dividing the sum of Field1 by the sum of Field2

Calculated Fields

Page 26: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try Question 2 in the “PivotTable & Calculated Field”

sheet.

Page 27: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Goal Seek

What is Goal Seek?

• Goal Seek determines input values needed to achieve a specific goal.

• You decide what value you want a cell to evaluate to, and Goal Seek adjusts values used in a formula to get that value.

Page 28: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Goal Seek Example

Page 29: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Try the question in the “Goal Seek” sheet.

Page 30: Basic Excel Workshop I - math.ucla.eduactuary/meetingsAndWorkshops/2019/E… · Relative Cell Reference •Excel default •When copied across multiple cells, they change based on

Questions?