Excel
Functions
KSU | Mathematics Department November 13th, 2019 | 2-3
Rahaf Alhodaif
It ’s a must for every actuary to be advanced on
Excel
And there is three facts about Excel 1-You will never cover all its magics
2-It’s super easy 3-It’s piece of cake
”
The new OIL DATA
DATA CLEANING
1. KEEP A COPY OF ALL UNTOUCHED, RAW DATA.
2. Document ALL of the steps you take in your analysis.
3. Always create a working summary sheet for yourself, that includes the following:
a. A directory of other sheets.
b. An explanation of analysis.
c. A short summary of your results.
● Data aggregation
is any process in which information is gathered and expressed in a summary form, for purposes such as statistical analysis.
●
A common
aggregationpurpose is to
get more information about particular
groups based on specific variables such as
age, profession, or income.
A NULLis any missing value in your data. There are four primary strategies for handling NULLvalues:
1. Delete them (only with caution).
2. Ignore them (some may have meaning).
3. Replace it with common value (e.g. median or zeros).
4. Find missing values (using reference resources).
Remark : If over 15% of a dataset is filled with NULLvalues, find a new data!
Because it will loss its credibility! Then we cannot follow it’s decision.
We now have a clean
data set that will be
used to do analysis
VLOOKUP(Vertical look up) Purpose ?
Lookup a value in a table by matching on the first column Return value ?
The matched value from a table
For example: you have tow tables (Prices tables /
Quantity table ) of a market data both has the product number column and you want to have (ID-Price-Quantity ) on one table, so you will look up by the ID and match the rows.
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Lookup_value is the value that will be used to match data. This is usually an identifier (an ID of some kind). It must exist in both worksheets.
Table_array is the table from which you want to retrieve data.
Col_index_num is the number of the column from the left side of the table_array from which you want to retrieve data.
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Range_lookup defines whether or not the lookup_value is an approximate match or an exact match of the value you are comparing it to in the left-most column of the table_array.
○
TRUE: Approximate match is needed.*○
FALSE: An exact match is required.Vlookup application:
What IF?
= HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
HLOOKUP stands for "Horizontal” like the Vlookup has the same arguments but instead of putting the column index number , We put the
row index number.
.
= HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
HLOOKUP stands for "Horizontal” like the Vlookup has the same arguments but instead of putting the column index number , We put the
row index number.
.
=MIN(...): Finds the minimum value of a range of numbers.
● Syntax: =MIN(number1, [number2], ...)
=MAX(...): Finds the maximum value of a range of numbers.
● Syntax: =MAX(number1, [number2], ...)
=SUM(...): Finds the sum of a range of numbers.
●
Syntax: =SUM(number1,[number2],...)=SUMIF(...): Sums the values in a range that meet the given criteria.
●
Syntax: =SUMIF(range, criteria, [sum_range])=SUMIFS(...): Similar to SUMIF, this sums the values in a range using specific criterias.
●
Syntax: =SUMIF(range, criteria1,[sum_range1],criteria2,[sum_range2]..)=AVERAGE(...): Finds the average
of a range of numbers.
●
Syntax: =AVERAGE(number1, [number2], ...)=COUNT(...): Counts the number of numeric values in a range.
●
Syntax: =COUNT(value1, [value2], ...)=COUNTIF(...): Counts the number of values in a range that meet the given criteria.
●
Syntax: =COUNTIF(range, criteria)=COUNTIFS(...): Similar to COUNTIF, this counts the number of values in a range using specific criteria
●
Syntax: =COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)=COUNTA(...): Counts the number of non-blank cells, (numeric OR text) not just the number of numeric cells.
●
Syntax: =COUNTA(value1,[value2], ...)=COUNTBLANK(...): Counts the number of blank cells in the range. This is the complement to COUNTA.
●
Syntax: =COUNTBLANK(range)PIVOT TABLES
Aggregate functions summarize data in various ways. These functions are helpful on their own, but they also play an integral role in using PivotTables.
PivotTables are tremendously helpful when creating summaries of data!
PivotTables is as a cupcake to the analyst. It’s allow you to quickly create dynamic aggregations, slices, and filters.
This means a PivotTable allows you to use your data as an active source — without having to write your own formulas.
PivotTables are an extensive topic — entire books have been written about them — but in this lesson learn enough to use them efficiently.
PivotTables have fourprimary components: filters, rows, columns, and values.
1.
Filters: Which datashould we include in our PivotTable? We’ll start by filtering out any data we don’t want to include.2.
Rows: What unique data valuesdo we want to have as rows in our table These values must exist in the data. If they don’t, you’ll need to create them first.3.
Columns: What unique data values do we want to have as columns in our table? These values must already exist.4.
Values:These are the values that will be in the cells of our table. To create them, we’ll have to tell Excel how we want them aggregated using the aggregation functions we’ve already learnedMore in pivot table..
o Dashboard o Charts
o Tables
o Slicer
More in pivot table..
o Dashboard o Charts
o Tables
o Slicer
Reserving
Making dashboards Analysis
Pricing
For now you have an overview about some of Excel most important functions that may help you dear actuary in,
Make life easier :
Repeat last action F4
Go to..
F5
Turn end mode on End
Select entire worksheet Ctrl+A
Undo Ctrl+Z
Add/delete the selected row or column
Ctrl+/-
Useful links:
https://www.youtube.com/watch?v=qu-AK0Hv0b4 https://www.youtube.com/watch?v=qu-AK0Hv0b4 https://www.youtube.com/watch?v=3kO_YqUpBCE https://www.youtube.com/watch?v=qu-AK0Hv0b4 https://www.youtube.com/watch?v=K74_FNnlIF8
Any question geniuses?