Module 2 - Lecture Note - Introduction To Excel
Module 2 - Lecture Note - Introduction To Excel
INTRODUCTION TO EXCEL
What is Excel?
Popular spreadsheet software developed
by Microsoft
Work with data in a tabular format (rows,
columns)
Global presence
Relied on by businesses of all sizes
Offers free and paid versions
User-friendly interface
Supports collaboration via shared workbooks, co-authoring, comments and more
Loading workbooks
Working with data
Creating first formula
Loading Workbook
➢ Navigate to the Google Monthly Stock Price sheet on the worksheet we have been
working on
➢ Create a new column with the header "Open vs Close".
➢ In the second row, subtract the value in the Open column from the value in the Close
column.
➢ Copy the cell references from the second row of the Open vs Close column to row 121.
➢ Set the column width for all columns to 13
➢ Highlight all values in the column Open vs Close
➢ What is the open vs close price on when date was 3/1/2014?
➢ What was the average difference in open vs close price?
Working with tables
INTRODUCTION TO EXCEL
Tables in Excel
Column header row - First row in a table that
contains column headings
Reference columns by name in table Apply rules to columns for certain data
Dynamic and automatically updates as types
Hides data you do not currently want to Integral part of data analysis
analyze Helps you quickly visualize and understand
Built-in comparison operations like greater your data better
than or top N Easier to find data when you know what
you're looking for
➢ Adventure Works is a global retail brand selling bikes, bike parts, and
accessories. You'll support their management team as an Analyst to help
them better understand their sales data.
➢ In this exercise, we are working with their Sales table which contains all
orders from 2017 to 2020. This will enable us start creating new calculated
columns and using structured references.
➢ Create a new column "OrderToDelivery" after the delivery due date column that
calculates the number of days between order and delivery for each row.
➢ Use a structured cell reference (the column name instead of the column reference).
Remember, to refer to a column name you'll need to use the @ sign.
➢ There are two ways that you can use a structured cell reference:
➢ Manually enter the column names using square brackets, for example:
[@DeliveryDueDate].
➢ Select the cell you would like to use as part of your formula by clicking on it.
➢ That doesn't look quite right! It's defaulted to a date… let's change it by changing the
data type to "Number".
➢ How many days on average does it take for Adventure Works to deliver once a customer
has placed an order?
Filtering data
➢ Remove any previous filters applied from the last exercise, we want to see all
orders.
➢ Change the sort to only sort by OrderNo ascending.
➢ Format the following columns as Currency: ItemCost and ItemPrice.
➢ Format the following columns as Number with 0 decimal places:
SalesOrderLineKey, OrderQuantity, and OrderToDelivery.
➢ Format all other columns as as Text.
➢ Maybe it's time we change up the table style too! Navigate to Table Design and
select any table style you like.
➢ How many columns are formatted as text in our Sales table?
Aggregate and
Arithmetic
operations
INTRODUCTION TO EXCEL
Order of operations: problem
Math Problem:
20 × 2 − (1/2) × 10 × 22
Order of Operations
Parenthesis
Exponents
Division/Multiplication (left-to-right)
Addition/Subtraction (left-to-right)
Order of operations: solution
Math Problem:
20 × 2 − (1/2) × 10 × 22
Solution
1. Parenthesis: 20 × 2 − 0.5 × 10 × 22
2. Exponents: 20 × 2 − 0.5 × 10 × 4
3. Multiplication: 40 − 20
4. Subtraction: 20
Order of operations in Excel
Order of operations: Parentheses, Exponents, Division, Multiplication, Addition & Subtraction
AVERAGE
COUNT
MIN
MAX
Aggregate functions
University of DataCamp
Aggregate functions: Average
University of DataCamp
AVERAGE(B:B)
AVERAGE(Students[Test Score])
Output: 74.2
Aggregate functions: continued
Min: Minimum value in the column Max: Maximum value in the column
MIN() MAX()
COUNT() SUM()
Understanding
house prices
INTRODUCTION TO EXCEL
Summarizing sales
➢ In cell T2, calculate the lowest item price across all sales.
➢ In cell T3, calculate the highest item price across all sales.
➢ In cell T4, calculate the average item price across all sales.
➢ Format all three cells you've created to have the dollar currency to 2 decimal
places.
➢ What is the average item price for all sales at Adventure Works?
Calculating total sales
Text Financial
Statistical Engineering
Cube
Information
Web
Compatibility
Text
LEFT() RIGHT()
Syntax: DATE(year,month,day)
Description: returns a sequential serial number that represents a particular date
COUNT()
MIN()
MAX()
Applying formatting
functions
INTRODUCTION TO EXCEL
Product profiles
➢ Create a new column "OrderYear" next to OrderDate that returns the year of the
order.
➢ Make sure that the column data type is Number and formatted to 0 decimal places.
➢ To insert a new column, highlight column K and on the Home tab, select Insert
and then Insert Sheet Columns. This will create a new column to the left.
➢ Your formula might look like this =YEAR([@OrderDate])
➢ Under Home > Date there is a dropdown where you can change the format.
Select Number.
➢ Create a new column "OrderMonth" next to OrderYear that returns the month of an
order.
➢ What is the average order line profit for 2020 orders?
Formatting with functions
➢ Unfilter your data from the previous exercise, so we can see all orders.
➢ Next to the summary statistics we created earlier, let's apply some rounding
to our lowest and highest item prices.
➢ In cells AB2 and AB3 apply a rounding up formula to 0 digits.
➢ Your formula might look like this =ROUNDUP(____, 0)
➢ In cell AB4, apply a standard rounding formula to 1 digit.
➢ What is the profit margin ratio when rounded to one digit?
Visualizing data in
Excel
INTRODUCTION TO EXCEL
Data visualization cheat sheet
1 https://www.datacamp.com/cheat-sheet/data-viz-cheat-sheet
What is data visualization?
Graphical representation of data using
charts, graphs, and other visual tools
Discover outliers
Styles
Labels
Color schemes
Visualization options
Visualization options
How to visualize
data
INTRODUCTION TO EXCEL
Visualizing categories
➢ From the Insert tab, create a 2D Column or 2D Bar chart to visualize Average
Sales by Product Subcategory.
➢ Select the range of data to include in the chart, in this case we can
simply click the table.
➢ With the data selected, go to the Insert tab and click on the Column icon
dropdown.
➢ Select the 2D Column or 2D Bar chart. For a basic column chart, you can
select the first option, which is labelled Clustered Column.
➢ Change the title of the chart to "Average Sales".
➢ Which category has the tallest column/bar and therefore has the highest
average sales?
Capturing parts of a whole
➢ The management team wants to explore how their orders vary from country to country
and state to state. We'll utilize a sunburst chart to visualize sub-categories within a larger
category. This powerful chart type allows us to visually represent the interconnectedness
and proportions of our data clearly and concisely. Sunburst charts are a type of treemap.
Capturing parts of a whole
➢ Visualizing data over time can help find trends in sales performance. To achieve
this, we will utilize line charts. However, a crucial step will be editing the data
source, which we'll explore during the exercise. Line charts offer a powerful
means to represent trends and fluctuations, providing valuable insights into
sales patterns.
➢ Navigate to the By Date sheet.
➢ Create a line chart to visualize Total Sales by OrderYear and OrderMonth. It may
not look right initially, but don't worry - we'll fix that in the next step.
➢ Let's start by opening the Select Data Source pop-up.
➢ To open the Data Source pop-up, navigate to Chart Design tab and click the
Select Data option.
Capturing a trend