0% found this document useful (0 votes)
44 views98 pages

Excel Foundation Training (I) ENG

In addition to hard coded values, formulas can also reference values in other cells. Simply type the referenced cell’s column letter and row number when inputting it into a formula . When you copy a formula that references other cell values, the referenced cells will change relative to where you move them.

Uploaded by

Gesese Ganka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views98 pages

Excel Foundation Training (I) ENG

In addition to hard coded values, formulas can also reference values in other cells. Simply type the referenced cell’s column letter and row number when inputting it into a formula . When you copy a formula that references other cell values, the referenced cells will change relative to where you move them.

Uploaded by

Gesese Ganka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 98

Foundations of Excel

May 2023
Purpose of this session

• To allow you to use Microsoft Excel efficiently on client engagements


• Key topics covered will be:
• Basic features, navigation, and formatting of Excel workbooks, including worksheets
and cells
• Several commonly-used functions and tools
• How to import data and organize the data once it has been imported
• Introduction to pivot tables
• Introduction to charts and how to create a basic chart
• Other helpful tools to assist in editing worksheets
• Various tips and resources
• Common shortcut keys
Agenda

Functions and formulas

Importing and organizing data

Pivot tables

Best practices

Appendixes

References
The primary focus of this course is on foundational Excel skills with some review of
advanced capabilities

Foundational Advanced Mastery

Applied Understand how to navigate Manipulate and format text in Mastery chart building (e.g.
Microsoft Excel efficiently Excel dynamic charts with different
Excel Understand Excel shortcut keys Understand advanced Excel but correlated data set with in
Understand standard formulas (e.g. logic) one graph)
formatting principles Perform advanced analytics on Understand how to design
Understand best practices for large data sets macros that increase ease of an
building formulas Understands efficient accuracy Excel model interface
Understand auditing formulas check mechanisms Understand visual basic and
and cell references Perform sensitivity and applicable uses
Convert and manipulate large scenario analysis Mastery of self-referencing
data sets Perform data validation (e.g. in- functions
Basic chart building cell dropdowns ) Understand how to apply
Advanced chart building advanced statistical concepts
Understand purpose of macros using Excel
and uses

4
Functions and Formulas
Functions and Formulas

Working within cells – absolute and relative referencing

•In addition to hard coded values, formulas can also reference values in other cells. Simply
type the referenced cell’s column letter and row number when inputting it into a formula
. When you copy a formula that references other cell values, the referenced cells will change
relative to where you move them.
• For example, if a formula references cell A1 and it is moved down two rows and across
two columns, the referenced cell will move down two rows and across three columns to
C3

• You can prevent this by “locking” the column, row, or both with a “$” symbol. By
Hint
default, all cells are set to relative referencing. Placing a $ before a referenced column
or row will make it absolute and lock the value from that column (row)

6
Functions and Formulas

Working within cells – absolute and relative referencing

• The following table outlines all referencing methods and the


values that result when moving a reference from A1 to C3:

Reference (Description) Changes To


$A$1 (Absolute column and Absolute Row) $A$1

A$1 (Relative Column and Absolute Row) C$1

$A1 (Absolute Column and Relative Row) $A3

A1 (Relative Column and Relative Row) C3

7
Functions and Formulas

Working within cells – problems with referencing

A #REF! Error occurs when a cell reference is not valid. Deleting or pasting over cells
referenced by other formulas can cause this type of error. To fix the error:
• To fix the error:
• Select the cell that displays the error
• Press Alt-T, U, E SHORTCUT Press Alt-T, U, E

• Review the possible causes and solutions


• Moving or deleting a referenced cell affects all the formulas that referenced it

8
Functions and Formulas

Working within cells – problems with referencing

To illustrate the problem with cell referencing


• Suppose you are adding two cells—A2 and A6
• You then delete the sixth row by selecting it and pressing Alt-E, D
SHORTCUT Press Alt-E, D

• You will now receive a reference error because that cell no longer exists

9
Functions and Formulas

Quick tip – range shortcuts

Allows for a quick glance at values for functions such as sum, count, max, and so on.
• Select the range of data
• Excel displays the range’s specified value on the bottom right-hand corner of the
screen
• Right-click on the value to change the functions

10
Functions and Formulas

Basic Function Review

We will now build on the basic functions and introduce more advanced functions. Below
is a quick review of the Excel functions you should already know.

Function Description
Sum Sum(number1,[number2],…) – adds together all the numbers in a range of
cells
Min Min(number1,[number2],…) – finds the minimum number in a series of
numbers or range of cells and returns that number
Max Max(number1,[number2],…) - finds the maximum number in a series of
numbers or range of cells and returns that number
Count Count(value1,[value2],…) – counts the total amount of cells containing
numbers in a given range of cells and returns an integer
CountA CountA(value1,[value2],…) – counts the total amount of cells containing text
in a given range and returns an integer

11
Functions and Formulas

Commonly used functions

Max Min
Definition This function will return the largest value This function will return the smallest
in a selected range of cells value in a selected range of cells

Parameters MAX(number1, (number2),…) MIN(number1, (number2),…)

Interpretation [number#]: 1 to 30 numbers for which [number#]: 1 to 30 numbers for which


you want to find the maximum value you want to find the minimum value

Example Note that Blank cells and Text are not included in the results of these functions
Formula Answer
=max (A1:A4) 30
=max (A1:A4, 100) 100
=max (A1, A3) 30
=max (A1, A5) 10
Formula Answer
=min (A1:A4) 10
=min (A2:A3, 100) 20
=min (A1, A3) 10
12
=min (A1, A5) 10 12
Functions and Formulas

The IF statement

IF Statement
Definition A conditional statement that returns a specified value if the condition you are
testing is true and another value if the condition is false

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

Interpretation [Logical Test]: If I13 (the cell containing the FY08 Budget) is greater than J13 (the
cell containing the FY08 Spend); [value if true]: enter “Under Budget” into the
cell; [value if false]: if not, enter “Over Budget”
Example Using the Savings Dashboard tab, determine if a given division was Under Budget
or Over Budget for FY08
Equation K13=IF(I13>J13, “Under Budget”, “Over Budget”)

13
Functions and Formulas

Advanced features of the IF statement (And, Or)

IF Statement (And, Or)


Definition And, Or functions allow the user to utilize multiple tests in order to determine if a
given statement is true
• And(logical1,logical2,…): When used within the IF function, requires that
all of the logical tests in the argument are true
• Or(logical1,logical2,…): When used within the IF function, requires that at
least one of the logical tests in the argument is true
Parameters If(Or(logical1,logical2),[value_if_true],[value_if_false])

14
Functions and Formulas

Advanced features of the IF statement (And, Or)

IF Statement (And, Or)


Interpretation [Logical Test]: If D13 (the cell information on whether the data is received) is
equal to “No” OR E13 (the cell information on whether the contract is received) is
equal to “No”; [value if true]: enter “Yes” into the cell; [value if false]: if not, enter
“No”
Example Using the Savings Dashboard tab, determine if we need to follow up with the
Stakeholder if we have not received data or have not received a contract
Equation F13=IF(OR(D13="No",E13="No"),"Yes","No")

15
Functions and Formulas

Useful Variations of the IF Statement—SUMIF

SUMIF Statement
Definition Adds the cells within a given range specified by a specific criteria

Parameters SUMIF(range, criteria, [sum range])


Interpretation [range]: the range of cells you want evaluated which must correspond to the criteria
you want to specify; [criteria]: the criteria in the form of a number, expression, or text
that defines which cells will be added; [sum range]: are the actual cells to sum if
different than the [range]; if not different then sum range is not needed
Example Using the Savings Dashboard tab, calculate the total amount of “Total FY08 Spend”
that is Under Budget and Over Budget
Equation F8=SUMIF(K13:K56,E8,J13:J56)
Sum
Range
Range

Criteria

16
Functions and Formulas

Useful Variations of the IF Statement—COUNTIF

COUNTIF Statement
Definition Counts the number of cells within a range that meet the given criteria

Parameters COUNTIF(range, criteria)


Interpretation [range]: the range of cells from which you want to count cells; [criteria]: the criteria in
the form of a number, expression, cell reference, or text that defines which cells will be
counted
Example Using the Savings Dashboard tab, count the number of divisions that are Over Budget
or Under Budget
Equation G8=COUNTIF($K$13:$K$56,E8)

Range

Criteria

17
Functions and Formulas

Commonly used functions—VLOOKUP

VLOOKUP
Definition VLOOKUP finds a predetermined value, compares it to the leftmost column in a table,
and returns a value in the same row
Parameters VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

When to Use VLOOKUP is an excellent function to use when the user needs to import data from
one table into another using a unique lookup value—or—if the user wants to verify
that data values from a certain table match the data values from another table
Identify a unique lookup value common to each table:
It seems that the field Division is unique and listed in both tables. We will use this
as our lookup value

18
Functions and Formulas

Commonly used functions—VLOOKUP

VLOOKUP
Interpretation [lookup value]: The value in the destination table we wish to look up in the source table. We
will use Division number as the Lookup Value
[table array]: This is the table from which we a getting the information (outlined in red
below)
[col index num]: Once Excel has located the lookup value (the purchase number), it needs to
know where the column with the data you wish to return is located, relative to the first
column. We want City, which is two columns to the right of the first column in the table
array, so the column index num is 2 [range lookup]: If you want VLOOKUP to find the exact
value in the table array rather than a range of values, put “FALSE” for the range lookup (you
will use false most of the time)

Source Table Destination Table

Lookup Value

Table Array

1 2 3 19
Col_Index_Num
Functions and Formulas

Commonly used functions—VLOOKUP

VLOOKUP
Example In our example, we have a tab (Division Information) that lists out all Division
Numbers and the associated City and State. On the Savings Dashboard tab we list
only the Divisions with savings associated with them and need to determine the
City and State

20
Functions and Formulas

Commonly used functions—VLOOKUP

VLOOKUP
Equation B13=VLOOKUP(A13,'Division Info'!$A$2:$C$101,2,FALSE)
Source Table Destination Table

Lookup Value
Table
Array

1 2 3
Col_Index_Num

So what did VLOOKUP do again?


Using the Division number in the “Savings Dashboard” worksheet as the lookup value
(located in cell A13), Excel looked for the same value in the “Division Information"
worksheet. Once it found the matching value, it returned the data that was in same row
but in the second (2) column. In this case, that value was “Milwaukee”

21
Functions and Formulas

Important things to remember about VLOOKUP

• If VLOOKUP does not find the lookup value in the table array, it will return “#N/A”
• Often, if the lookup value is not formatted correctly, VLOOKUP will return “#N/A”
even if the values are the same. Make sure the lookup values in both tables are
formatted the same

• VLOOKUP uses the first column in the table array to find the lookup value. If the
lookup value cannot be found in the first column (i.e., Maybe it is in the second or
third column), change the table array so that the column with the lookup values is
first. If you do not, Excel will return “#N/A.”

• It is helpful to sort the table array before using the VLOOKUP (sort by the column
containing the lookup values)

22
Functions and Formulas

Important things to remember about VLOOKUP - continued

• When copying VLOOKUP formulas down a table, it is extremely important to make


the table array parameter an absolute reference. Using our last example, the table
array in the VLOOKUP formula was ‘Division Information’$A$2:$C$101. If we left
out the “$” and simply put ‘Division Information’A2:C101, when we copy and
pasted the formula down the table, the table array that VLOOKUP was referencing
would change and eventually Excel would not find the lookup values
• HLOOKUP performs the same function as VLOOKUP, but instead of looking for a
value in a column, it looks for the value in the topmost row and returns a value in
the same column

• Transfer all of the City fields down column B. Create a new equation that
Hint
locates the State and fill that down column C

23
Functions and Formulas

Advanced Excel function – Conditional Formatting

•Conditional formatting can be used to locate invalid or incorrect data or to highlight reference cells that
need to be accentuated for presentation purposes. Conditional formatting automatically applies a format,
such as cell shading or font color, to cells if a specified condition is true.
 Select the data range you want to apply conditional
formatting to.
– Press Alt-O, D SHORTCUT Press Alt-O, D

 You can create new formats by selecting the New


Rules button
 On the Savings Dashboard worksheet, format the
background red and font white for any “No” that
appears in the Date Received or Contract Received
column.
– Highlight the range D13:E56 and click Alt-O-D
– Select the New Rules button, select Format Only Cells
that Contain and format white as the font color and red
as the pattern background

24
Importing and Organizing Data
Importing and Organizing Data

Importing and Organizing Data Overview

In this section we will


• Provide a detailed overview of how to import and organize external data
• Import data into Excel using the Import Wizard
• Organize the data into a more visually appealing format

As a result you will be able to follow a methodical approach to importing and then organizing data
for analysis; thus enabling you to be successful where the data given to you by the client is in a
format that is unusable, and Excel is needed for analysis

26
Importing and Organizing Data

Importing and Organizing Data Overview

When importing data into Excel copy and paste usually does not work
• Copying and pasting text documents into Excel has limitations
• When it is copied from the text file into Excel, it is usually placed in separate
rows, but not in separate columns
• Open the orders.txt file, select all the data and select Edit  Copy
• Paste the data into an Excel spreadsheet; notice how the content is pasted into
the workbook; cell A1 has all the contents of the first row of the text file and it is
not divided up into separate columns
• We need to use the Wizard in order to import this text file

27
Importing and Organizing Data

Importing orders.txt via the Excel wizard – Step 1

• Determine whether the text file is delimited


or fixed width
• Delimited: Characters such as commas or
semicolons separate
the data in the text file
• Fixed Width: Fields are aligned in columns
with spaces in between each field
• Click Next to move to step two
of the Wizard

28
Importing and Organizing Data

Importing orders.txt via the Excel wizard – Step 2

• Step two you must decide what character


delimits the data in the text file
• The preview in the bottom of the screen allows
you to see how
your data is affected by selecting the different
delimiter
• Tab is selected by default, but looking at the
preview you can
see that the data is still not divided into
columns

29
Importing and Organizing Data

Importing orders.txt via the Excel wizard – Step 2 continued

• Deselect the Tab delimiter and select Comma delimiter


• Notice how the data changes in the preview pane at the bottom of the screen
• Once you see that the data is divided into columns, you can click Next

Occasionally a text file


contains two delimiters. If so,
select this box to treat the
two delimiters as one.

If the text in the file is


enclosed within a character
like quotation marks, then
you can indicate that with this
dropdown box.

30
Importing and Organizing Data

Importing orders.txt via the Excel wizard – Step 3

• The last step in the wizard allows you to format the data you are importing to Excel
• For instance, if you know that you are importing a date field then you can select that
column and format it as a date by clicking the date radio button
• In this case we will leave all columns as General format so click Finish to finish
importing the data

Column Data Formats


• General – converts text numbers to
numeric values, dates to dates, and
all remaining types to text.
• Text – formats the data as text and
The user can
if it is a number you can no longer
select the
do calculations with it.
different
• Date – formats the data as a date;
columns and
the user can select the various types
then select how
from the dropdown menu.
to format the
• Do not import columns – allows the
data.
user to select a field to not import.

31
Importing and Organizing Data

Importing Wizard with a fixed width file

• There may be times when you need to work with


a Fixed Width File (mainframe downloads)
• If you selected Fixed Width in step 1 of the
Wizard, then step 2 will be slightly different
• The user sets up their own line breaks to
establish the widths of the columns that will
divide the data
• Similar to the Delimited example, Step 3 of the
Wizard allows you to format specific columns of
the data

32
Importing and Organizing Data

Organizing data

• Sorting the data allows the user to arrange the data either ascending or
descending by one or multiple fields

• Sorting is useful when analyzing data in chronological order or suppliers and


customers in alphabetical order

• Before sorting, insert a numbered field in the first column called reset
Hint
allowing the user to resort the data to the original table setup when complete

33
Importing and Organizing Data

Organizing data – Sorting records

• Highlight the entire data set and select Sort from the Data ribbon
SHORTCUT Press Alt, D, S

• Using the dropdown and


radio buttons, we want to
sort Ascending by Date
• You can choose to sort by
up to three different fields
• Click Enter and review the
results

• To return to the original set of data, repeat these steps, and then sort Ascending
by the Reset field

34
Importing and Organizing Data

Organizing data – Auto filter

• Applying filters allows you to create a more


understandable view of your data
• To apply a filter, highlight all the data
• Select Filter from the Data ribbon
SHORTCUT Press Alt, D, F, F

• You should see little dropdown boxes for


each of the field headings allowing you to
filter out specific results
• For instance, we only want to look at data
for the Duke of Bleach Supplier
• How many records are there?

35
Importing and Organizing Data

Cleaning imported data – remove characters


using find and replace

• Find and Replace allows you to search for


specific characters and replace them with
characters of your choice
• In this case, we want to search for a “<” and
replace it with nothing (in essence removing it)
• From the Home ribbon, select Find &Select and
in Find what type “<” and leave the Replace with
column blank SHORTCUT Press Alt, E, E to select Replace

• Click on Replace All and see how the file


changes

36
Importing and Organizing Data

Cleaning imported data – using concatenate

• Concatenate allows you to combine the contents within multiple cells into one cell
with a text value
• In this situation, we want one field that lists the Contact Last Name, Contact First
Name
• We can use the Concatenate function in order to combine these and put a comma
in-between
• Concatenate(text1,[text2],…) returns the strings from the text combined into one cell

• In a new column titled Clean Name, create an equation to concatenate the last name
and first name with a comma in the middle

37
Pivot Tables
Pivot Tables

Pivot Table Overview

In this section we will


• Introduce PivotTables, which are a critical advanced skill for data analysts looking to
efficiently filter and summarize large amounts of data
• Present simple PivotTable examples
• Convey the importance of PivotTables in data analysis

39
Pivot Tables

There are two paths to creating a pivot table

Path 1 Path 2

• From the Insert ribbon, select Pivot • Step 1 - Click on a cell on the page
and use the SHORTCUT Press Alt, D, P
Table

• Selecting a cell inside the data table


before starting the Wizard, Excel will
automatically select the entire data • Choose Microsoft Excel list or
range and it will appear in the box database and PivotTable
• Select OK creates the pivot table • Click Next

40
Pivot Tables

There are two paths to creating a pivot table

Path 1 Path 2
• Pivot table is created in a • Step 2 - Selecting a cell inside the data table
new worksheet before starting the Wizard, Excel will
automatically select the entire data range and it
will appear in the box

• Step 3 – Select New Worksheet

41
Pivot Tables

Determining the layout for a pivot table

• To create the pivot table


layout is simply drag-n-drop
• Column fields are the
column labels in your
source data table
• Row fields are row labels
that
you wish to use to
summarize
the data
• We want to summarize the
data by manufacturing
center,
so click and drag the
Manufacturing Center field
to the Row Label

42
Pivot Tables

Determining the layout for a pivot table

• Column fields are labels by


which each row field is
analyzed
• We want to analyze the
total cost per manufacturing
center by quarter, so add
“Quarter” to the column
area
• Page fields are fields that
can be used to filter the
pivot report
• Depending on what is being
produced, certain plants will
purchase Resin and others
will purchase Chlorine. To
have the option of sorting
the report by raw material
purchased, add “Raw
Material” to the Page Area

43
Pivot Tables

Determining the layout for a pivot table

• Data fields represent the actual data that will be summarized by each row and column field
• We want to see the total cost for each manufacturing center, so add the “Price Paid to Suppliers”
field to the data area

44
Pivot Tables

Determining the layout for a pivot table

• Excel automatically uses a function to summarize fields placed in the data area. In this case, it has
chosen the sum function to add up the prices paid by each manufacturing center
• Double Click on Sum of Price…. The PivotTable Field menu should be displayed. If you wished to
change the function to count, average, or many other functions, you can do so here
• Additionally, you can format the numbers displayed in the report here as well. By default, the numbers
will be in the regular number format, but for our purposes we would like it to be in the currency format.
• Click the Number button  Under category select Currency  Click OK twice to exit the menu

45
Pivot Tables

Helpful features when creating pivot tables

There are many helpful features that can help better present data within the PivotTable.
• You can access the Field Settings menu anytime by selecting a cell inside the
PivotTable, right-clicking, and selecting it from the menu
• The field settings menu will pertain only to the field area that you initially selected, i.e.,
if you select a cell within the data area under the Price Paid to Supplier field, the
settings you change will only correspond to that field
• To only view the total cost of manufacturing centers purchasing chlorine, click the
page pull-down tab (where we placed Raw Materials) and select Chlorine
• You can turn on/off Grand Totals by selecting a cell inside the PivotTable, right-
clicking, and going to Pivot Table Options
• When changing source data, ensure you refresh the Pivot table

46
Pivot Tables

Pivot table key takeaways

• Through detailed research and analysis, we are expected to provide insightful


recommendations that meet or exceed client expectations. PivotTables enable
this process and a thorough understanding of how they work is essential
• PivotTables are extremely powerful tools that can easily guide you through
detailed analyses
• Play around! By summarizing data in different ways, you can analyze the data
and make findings you would not have found otherwise

47
Best Practices
Best Practices

Best Practices

General Tips Prepare a Client-Ready Deliverable


• Lay out worksheets clearly • Always set up a document or
and logically worksheet for printing before
• Never assume that someone
will check your work sending it to the client or your
• Learn the shortcut keys project team
• Avoid v-lookups/cell • Always include headers and
references to Excel sheets footers (worksheet title, date,
that are not in the same version)
file/workbook • Label "draft" if the version is a
• Save frequently and routinely
back-up your models draft
• A consistent way to name • Format all cells appropriately
files and ensure version before sending files to others
control is "File • Set the cursor to cell A1 for each
Name_Month_Day_Year_Ve spreadsheet prior to saving
rsion X”
• Save a new version after • Spell check your major summary
internal/client reviews or other client review tabs

49
Best Practices

Best Practices

Data Analysis and Modeling

• Do not "hard code" assumptions into • Do not use colors to


formulas; use an assumptions sheet or sort/distinguish different types of
section to specify all variables data; you cannot sort by color in
• Always include data checks in your Excel
models (row/column totals, etc.) • Do not use very long formulas.
• Never assume that you will remember It is too hard to review and
how you did something (utilize validate; try to decompose and
"Comments" feature) add intermediate lines
• Document data sources with comments • Learn how to use pivot tables. It
or footnotes will make your life a lot easier

50
Best Practices

Best Practices

Formatting

• Do not get too sophisticated with formatting—hard to update, adds


file size, hard for some to recreate
• Use consistent alignments across rows (top, middle or bottom) and
columns. In columns, right-justify numbers, left-justify or center
other cells
• Utilize grouping of rows/columns function, especially instead of
“Hide”

51
Appendices

52
More Functions for Importing, Cleaning,
and Organizing Data
Importing, Cleaning, and Organizing Data

Importing data using text to columns

• Recall that when pasting a text file


into Excel the information is pasted in
separate rows, but not columns
• There is an alternate way to separate
the data into columns without using
the Import Wizard
• Open orders.txt  Select All  and
Paste the data into a new workbook
• The data should be separate rows,
but not in separate columns

54
Importing, Cleaning, and Organizing Data

Importing data using text to columns

• From there, select Column


A and go to Data  Text to
Columns SHORTCUT Press Alt, D, E
• The user will then be
prompted with the same
screens as the Import
Wizard allowing the user to
select whether it is
delimited and format
columns as certain data
types

55
Importing, Cleaning, and Organizing Data

Cleansing imported data

Looking back at orders.txt, what are some issues you see with the imported data?

Date Supplier Contact First Supplier Contact Last Name


Name •All names are begin with
•The date column is •A leading space appears a ‘>‘ sign
currently not formatted in some of the names • Last name is separated
as a date • All names are followed from first name
by a ‘<‘ sign
• First name separated
from the last name

56
Importing, Cleaning, and Organizing Data

Setting up the data to be cleaned

• The first step is to create a backup of the


data you are about to clean just in case
something goes wrong
• Rename the worksheet where you
imported the data Original Data
• As a refresher, to do this you right click
on the tab and select Rename
• Backing up the Data
• Right click on the Orders tab and select
Move or Copy
• Click the down arrow to select (move to
end) and select Create a Copy
• Click Enter and a copy of the Orders
page is created (Original Data (2))
• Rename Original Data (2) to Clean Data

57
Importing, Cleaning, and Organizing Data

Helpful Excel functions to assist with cleaning data

Function Name Description Example


Length – Len(text Counts the length of the text =Len(O1) would return ‘8’
or cell reference) you entered or the text in the
cell you referenced and returns
a number
Right – Right(text, Returns the last characters in a =Right(O3,4) would
[num_characters]) text string, based on the return ‘Inc.’
number of characters you
specify
Left – Left(text, Returns the first characters in a =Left(N3,2) would return
[num_characters]) text string, based on the ‘TO’
number of characters you
specify

58
Importing, Cleaning, and Organizing Data

Helpful Excel functions to assist with cleaning data - continued

Function Name Description Example


Mid – Mid(text, Returns a specific number of =Mid(O4,2,4) would
start_num, characters from a text string, return ‘ronx’
num_characters) starting at the position you
specify, based on the number
of characters you specify
Trim – Trim(text) Returns the text and removes =Trim(N2) would return
any leading or trailing spaces ‘LB’ with no leading or
trailing spaces
Find – Locate one text string within a =Find(“soe”,O2) would
Find(find_text, second text string, and return return 5
within_text, the number of the starting
start_num) position of the first text string
from the first character of the
second text string

59
Importing, Cleaning, and Organizing Data

Analyzing the current data field

• Cleaning the data field


20040609
The left four characters Characters 5 and 6 are the The right two characters
are the year month are the day figures

• Working off of the Clean Data


sheet, Right-click in column G
and select Insert (repeat three
more times to insert four
columns)
• Name these columns Day, SHORTCUT Press Alt, I, C
Month, Year, and Clean Date

60
Importing, Cleaning, and Organizing Data

Cleaning imported data

• The Day Portion of the Date


• Use the Right formula to pull the
right two characters out of the
current date format
• In cell G2, type an equation that
will return the right two
characters for the Day
• Auto-fill this formula down
column G
• The Month Portion of the Date
• Use the Mid formula to pull the
fifth and sixth characters out
• In cell H2, type an equation that
will return those two characters
for the month
• Auto-fill this formula down
column H

61
Importing, Cleaning, and Organizing Data

Cleaning imported data

• The Year Portion of the Date


• Use the Left formula to pull the
left four characters out of the
current date format
• In cell I2, type an equation that
will return the left four characters
• Auto-fill this formula down
column I
• Creating the Clean Date
• Now we have the Month, Day,
and Year and need to combine
them to create a data
• Use the Date function for this
• Date(year,month,day) returns a
formatted date given the inputs
• Using the Date function, enter a
formula in J2 that will return the
proper date based on the
information we just gathered

62
Importing, Cleaning, and Organizing Data

Cleaning imported data

• Cleaning the Contact’s First Name


• Note the First Name has two issues:
• Leading spaces in some of the name
• All names are followed by a “<”
• Leading spaces:
• To deal with the leading spaces, insert a
column to the right of the Contact’s First
Name called Clean First Name.
• The Trim function removes any leading
and trailing spaces in a cell
• In cell Q2, enter a function that will
remove the leading spaces on the first
name
• Removing the “<” symbol:
• This can be done either through functions
we have learned or by using the Find and
Replace

63
Importing, Cleaning, and Organizing Data

Organizing the data – custom auto filter

• The Custom Auto Filter allows you to


set criteria to determine the records you
want to see
• How would we display only those
records where the quantity ordered was
in Tons and the price was between
$315 and $330?
• With Auto Filters still turned on, select
the Quantity_uom field and select only
TON

64
Importing, Cleaning, and Organizing Data

Organizing the data – custom auto filter

• For the price we will need to use a


Custom Filter
• In the dropdown for the Price field, select
Number Filters and then
Custom Filter
• A dialog box pops up allowing you to
select how to define the custom criteria.
• In order to get it between those two
values, we want to have one criteria being
greater than or equal to 315 and the other
being less than or equal to 330
• How many records are displayed?

65
Other Helpful Tools
Other Helpful Tools

Grouping rows and columns

• Why is it useful?
• Grouping allows the user to continuously hide and unhide both rows and columns of
data
• In addition, it allows another viewer of the data to see that there are hidden rows and
columns where the hide rows and columns function does not
• When do you group data?
• When constantly hiding/unhiding data
• Group data together that is no longer relevant to the rest of the work on the page but
is important enough not to delete
• Group similar data together to make for easy navigation throughout large
worksheets

67
Other Helpful Tools

Grouping rows and columns

Use the Purchase Info sheet from the Combined Excel_July2008.xls file
• On the Purchase Info sheet, highlight columns D, E, and F
• Click Alt-D, G, G SHORTCUT Press Alt-D, G, G
• When grouped, you will see a minus sign and a line above the three columns

• Clicking the minus sign hides those the columns and makes the minus sign a plus
sign

• To ungroup, highlight the columns again and click Alt-D-G-U SHORTCUT Press Alt-D, G, U

68
Other Helpful Tools

Freezing panes

• Freezing panes allows a portion of the spreadsheet to stay stationary while the
rest of the spreadsheet scrolls up or down and left or right

• When is it useful?
• Scrolling down large tables and still wanting to see the labels in the top row
• Scrolling right in large tables and still wanting to see labels in the first column

• For example, in our file we always need to see the key and order columns
when scrolling right and the labels in the top row

69
Other Helpful Tools

Freezing panes

• To do this, select the cell directly


below the row and to the right of
the column you would like to
freeze.
• Select cell C2 and from the View
ribbon select the Freeze Panes
drop down and select Freeze
Panes SHORTCUT Press Alt, W, F, F
• Notice how Row 1 is now
stationary as are Columns A and
B
• To unfreeze, from the View
ribbon select the Freeze Panes
drop down and select Freeze
Panes SHORTCUT Press Alt, W, F, F

70
Other Helpful Tools

Using comments is another best practice

• Comments are helpful as


explanatory notes or for keeping
tack of data changes. Use
comments sparingly, but as
needed
• To insert a comment, press Alt-I,
M SHORTCUT Press Alt-I, M

• Comments are only flagged in


cells, but can be opened for
viewing
• Comments can be edited and
deleted SHORTCUT Press Alt-V, C
• To view a comment, press Alt-V,
C

71
Other Helpful Tools

The auditing tool is the best way to locate an


error in a formula

• Auditing allows the user to trace the precedents and


dependents of a cell
• Example: cell D3 contains a formula that contains
data from cells A1 and B2
• Pressing Alt-T, U, T will generate blue lines that will
“trace” a path from precedent cells A1 and B1 SHORTCUT Press Alt-T, U, T
• If there is an error in cell D3, then the Trace
Precedents function will generate a red line from the
precedent cell containing the error
• You can also select cells A1 and B1 and trace the
cells that depend on them, D3 in this case, by
pressing Alt-T, U, D SHORTCUT Press Alt-T, U, D

72
Other Helpful Tools

Data validation

A great tool to use if you want to limit what a user is allowed to input into cells or make data entry more
efficient. Example: We know that the only values we will be entering for the “Data Received” and
“Contract Received” is “Yes” or “No.” We can create a dropdown list that constrains the user to only
entering those two values.
• Highlight the range D13 to E56;
this is the area that we will
apply the Data Validation to
• From the Data ribbon, select
Data Validation SHORTCUT Press Alt-D, L
• Under Allow, click the dropdown
box and choose List because
the user will select from a
list of values
• In the source box type Yes, No

73
Other Helpful Tools

Data validation

• Select Input Message tab where you can


write the message that would appear
when the user selects the cell
• We will not use this feature in this
example
• Select the Error Alert tab where you can
write the message the user will see if he
inputs a value not found on the list
• Click OK to finish the validation

74
Other Helpful Tools

Data validation

• Now whenever the user selects the


cell where the data validation was
applied, he or she will can click on
a dropdown tab and select a value
from the list

• If the user types a value not found


within the list, the error message
you wrote will be displayed and the
user will be prompted to select a
value from the list

75
Other Helpful Tools

Data validation – other helpful applications

• Only allow the user to enter certain dates


• Example is we do not want the user to
enter any Completion Date before
12/1/2007
• In the Allow box, select Date
• In the Data box, select greater than
• In the Start Date box, type 12/1/2007
• Limit the values that a user can enter
• Example is we do not want the user to
enter an Estimated Savings figure greater
than $250,000
• In the Allow box, select Decimal
• In the Data box, select less than
• In the Maximum box, type 250000
(no dollar sign or comma)

76
Other Helpful Tools

Data validation – other helpful applications

• Other Data Validation possibilities include


• Whole Number only allows certain whole numbers to be entered into
a cell
• Text Length allows the user to limit the number of characters that
can be entered into the cell
• Custom allows the user to use a formula in order to validate a cell

77
Reference Guide
Keyboard Shortcuts

Frequently used keyboard shortcuts - general

Action Keystroke Action Keystroke


Help F1 Unhide rows Shift + Ctrl + 9
What’s this help Shift + F1 Unhide columns Shift + Ctrl + 0
Save Ctrl + S New worksheet Shift +F11
Save As F12 New macro sheet Ctrl + F11
Print Ctrl + P New chart sheet Alt + F1
New workbook Ctrl + N New chart F11
Open workbook Ctrl + O Insert row Alt + Enter
Close workbook Ctrl + W Insert cells Shift + Ctrl + =
Spell check F7 Insert hyperlink Ctrl + L
Hide rows Ctrl + 9 Quit Excel Alt + F4
Hide columns Ctrl + 0
79
Keyboard Shortcuts

Frequently used keyboard shortcuts – highlighting

Action Keystroke Action Keystroke


Select left Shift + left Arrow Extend selection F8
Select right Shift + right Arrow Add to selection Shift + F8
Select up Shift + up arrow Select array Ctrl + /
Select down Shift + down arrow Select differences Ctrl + \
Select row Shift + Space Collapse selection to Shift + backspace
Select column Ctrl + Space active cell

Select All Ctrl + A Fill selection with Ctrl + enter


active cell
Select Region Shift + Ctrl + 8
Select comments Shift + Ctrl + O
Select Visible Cells Alt + ;
Select Unequal cells Shift + Ctrl + \

80
Keyboard Shortcuts

Frequently used keyboard shortcuts – navigating

Action Keystroke Action Keystroke


Find Ctrl + F Move left area Ctrl + Left arrow
Replace Ctrl + H Move right area Ctrl + Right arrow
Find again Shift + F4 Move up area Ctrl + Up arrow
Find previous Shift + Ctrl + F4 Move down area Ctrl + Down arrow
Go to Ctrl + G Left 1 screen Alt + Page up
Go to active cell Ctrl + Backspace Right 1 screen Alt + Page down
Begin row Home Next pane F6
End row End Previous pane Shift + F6
Start of worksheet Ctrl + Home Next window Ctrl + F6
End of worksheet Ctrl + End

81
Keyboard Shortcuts

Frequently used keyboard shortcuts – navigating

Action Keystroke Action Keystroke


Previous window Alt + F6 Minimize workbook Ctrl + F9
Next worksheet Ctrl + Page down Data menu Alt + D
Previous worksheet Ctrl + Page up Edit menu Alt + E
Previous workbook Shift + Ctrl + F6 File menu Alt + F
Move window Ctrl + F7 Help menu Alt + H
Close window Ctrl + F4 Insert menu Alt + I
Resize window Ctrl + F8 Format menu Alt + F
Restore window size Ctrl + F5 Tools menu Alt + T
Maximize window Ctrl + F10 Windows menu Alt + W
Control menu Alt + -
Control box Alt + Space Bar
82
Keyboard Shortcuts

Frequently used keyboard shortcuts – navigating

Action Keystroke
Next application Alt + Tab
Active menu F10

Context menu Shift + F10


Show/Hide standard toolbar Ctrl + 7
Toggle formula view Ctrl + ~
Toggle object display Ctrl + 6

83
Keyboard Shortcuts

Frequently used keyboard shortcuts – formatting

Action Keystroke Action Keystroke


Bold Ctrl + B Date format Shift + Ctrl + 3
Italics Ctrl + I Currency format Shift + Ctrl + 4
Underline Ctrl + U Percentage format Shift + Ctrl + 5
Toggle bold Ctrl + 2 Exponent format Shift + Ctrl + 6
Toggle italics Ctrl + 3 Apply border Shift + Ctrl + 7
Toggle underline Ctrl + 4 No border Shift + Ctrl + -
Toggle strikethrough Ctrl + 5 Style Alt + ‘
Cell format Ctrl + 1 Font name Shift + Ctrl + F
General format Shift + Ctrl + ` Font size Shift + Ctrl + P
Number format Shift + Ctrl + 1 Insert date Ctrl + ;
Time format Shift + Ctrl + 2 Insert time Ctrl + :
84
Keyboard Shortcuts

Frequently used keyboard shortcuts – editing

Action Keystroke Action Keystroke


Edit mode F2 Undo Ctrl + Z
Edit comment Shift + F2 Repeat active Ctrl + Y
Cut Ctrl + X Repeat action F4
Copy Ctrl + C Delete selection Ctrl + -
Paste Ctrl + P Delete to the end of the line Ctrl + Delete
Copy formula from above Ctrl + ` Auditing toolbar Alt + M A
Copy value above Ctrl + shift + ` ...trace precedents Alt + M P
Paste name formula F3 …trace dependents Alt + M D
Fill down Ctrl + D …remove arrows Alt + M A A
Fill right Ctrl + R Outline Ctrl + 8

85
Keyboard Shortcuts

Frequently used keyboard shortcuts – editing

Action Keystroke
Page setup Alt + P S P
Print Ctrl + P

Print preview Alt + F W V


Redo Ctrl + Y
Rename sheet Alt + H O R
Repeat F4
Replace Ctrl + H
Set print area Alt + P R S

86
Keyboard Shortcuts

Frequently used keyboard shortcuts – functions

Action Keystroke
Calculate all F9
Calculate worksheet Shift + F9

Auto sum Alt + =


Macro list Alt + F8
VB editor Alt + F11
Formula arguments Shift + Ctrl + A
Drop down list Alt + down arrow

87
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


CONCATENATE =concatenate (text 1, Text 1: first set of text Combines two or more
text 2 . . . ) Text 2: second set of text sets of text into a single
cell
COUNT =count (range) Range: specifies a set of Counts the # of cells
cells to be counted within a range

COUNTIF =countif (range, Range: range of cells to be Counts the # of cells


criteria) counted within a range that meet
Criteria: Criteria in the form of the given criteria
a number expression, or text
that defines which cells will
be counted

88
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


HLOOKUP =hlookup Lookup_Value: value to be Combines two sets of
(lookup_value, found in the first column of data using a common
table_array, the array identifier
row_index_num, Table_Array: table of
range_lookup) information in which the
data is looked up
Row_Index_Num: number
of the column in
table_array from which the
matching value must be
returned
Range_Lookup: logical
value

89
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


IF =if (logical_test, Logical_Test: Any value or Represent a way to
value_if_true, expression which can be include IF-THEN
value_if_false) evaluated to be TRUE or statements in
FALSE (A10>500) spreadsheets
Value_If_True: value that is
returned if the logical test is
true
Value_If_False: value that
is returned if the logical test
is false

90
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


MAX =max (range) Range: the set of cells for Returns the maximum
which you want to evaluate value from a set of
the maximum numbers
MIN =min (range) Range: the set of cells for Returns the minimum
which you want to evaluate value from a set of
the minimum numbers
PERCENTILE =percentile (array, Array: the range of cells to Determines the
K) be evaluated percentile values for a
K: 100 – the integer set of data
specifying the percentile = percentile(A1:A9, 10)
determines the 90th
value to be determined percentile

91
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


QUARTERTILE =quartile (array, Array: range of cells to be
Determines the
quart) evaluated quartile values for a
Quart: a number between 0 set of data
and 4 which specifies the
quartile value
SUMIF =sumif (range, Range: range of cells to be Adds the cells
criteria, sum_range) evaluated specified by a given
Criteria: the criteria in the form of
a number, expression, or text
criteria
that defines which cells will be
added
Sum Range: Range of cells to
sum if their corresponding cells
in the range match the criteria

92
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


SUMPRODUCT =sumproduct (array Array 1: first array Multiplies
1, array 2, array 3, . arguments corresponding
..) Array 2: second array components in the
arguments given arrays and
returns the sum of
those products
TRIM =trim (text) Text: text expression Removes unwanted
spaces from data sets

93
Functions

Frequently used functions

Function Formula Formula Syntax Description / Uses


TREND =trend (known_y’s, Known-Y’s: set of known y- Returns y-values
known_x’s, values along a linear trend for
new_x’s, const) Known-X’s: set of known x- an array of new X’s
values
New-X’s: New x-values for
which you want to trend to
return corresponding y-
values
Const: logical value
specifying whether to force
the constant b to equal 0

94
Functions

Frequently used tools

Tool Location Description


Absolute and Cell referencing is relative by default. Useful when copying and pasting
Relative Absolute cell referencing is performed formulas. Properly placed “$” will
Referencing by using the “$” in the front row and/or prevent multiple formula entry
column references
Formula Formulas ribbon then select Formula Allows users to trace the relationships
Auditing Auditing between cells with arrows

Conditional Home ribbon then select Styles Format cells based on user-defined
Formatting conditions

Auto Filter Data ribbon then select Sort & Filter Allows the user to filter out rows within
a data set based on certain cell
contents. The user will select the filter
criteria from a drop-down menu

95
Tools

Frequently used tools

Tool Location Description


Find / Replace Home ribbon then select Editing Allows the user to quickly find and
replace specific text / numbers within
a spreadsheet
Freeze Panes View ribbon then select Window Allows the user to freeze certain
portions of a worksheet so that they
always appear, even when scrolling
Group and Data ribbon then select Outline Allows the user to effectively organize
Outline rows and/or columns into groups so
that they may be hidden or unhidden
as a group
Macros Microsoft Home Office Button Allows the user to record repetitive
and then select actions so that they may be repeated
with the click of a button or
Excel Options established hot key

96
Tools

Frequently used tools

Tool Location Description


Paste Special Home ribbon then select Clipboard Provides additional options when
pasting in Excel such as pasting text
only, formulas only, formatting only,
etc.
Pivot Table Insert ribbon then select Tables Method that will quickly summarize
information from large data sets into a
user-defined table format
Sort Data ribbon then select Sort & Filter Allows the user to quickly sort large
data sets by user-specified variables
in ascending or descending order
Subtotals Data ribbon then select Outline This tool prompts Excel to create
subtotals or summation rows within
large data sets

97

You might also like