O Pivot Tables: Pg.2-5 o o o Pg.5-11
O Pivot Tables: Pg.2-5 o o o Pg.5-11
2-5
o Purpose Pg. 2
o Example Pg.2-3
o How to use the tool Pg3-5
o VLOOKUPS Pg.5-11
o Purpose Pg.5
o What this function does Pg.5-6
o Example Pg.6
o How to use the function Pg.6-7
o Understanding how to organize and select your table Pg.7-8
o The importance of unique values Pg.8-9
o Issues because of formatting differences Pg.9-10
o VLOOKUP across all sheets in a workbook Pg.10-11
o Data Validation Pg.11-12
o Purpose Pg.11
o Examples Pg.11
o How to use the tool Pg.11-12
o Data Validation – List Pg.12
o HLOOKUPS Pg.12-13
o Match Function Pg.13-14
o Purpose Pg.13
o What this function does Pg.13
o Example Pg.13-14
o How to use this function Pg.14
o Count If Function Pg.14-15
o Purpose Pg.14
o What this function does Pg.15
o Example Pg.15
o How to use this function Pg.15
o Sum If Function Pg.15-17
o Purpose Pg.15-16
o What this function does Pg.16
o Example #1 Pg.16
o How to use this function Pg.16
o Example #2 Pg.17
o If Function Pg.17-18
o Purpose Pg.17
o What this function does Pg.17
o Example Pg.17-18
o How to use this function Pg.18
1
o Tips & Tricks Pg.18-19
o Quickly move or copy a worksheet(s) Pg.18-19
o Select and work in multiple worksheets Pg.19
o Make special selections (all blanks) Pg.19
o Simultaneously make the same entry into all cells selected Pg.19
o PIVOT TABLES - (Difficulty Level: Intermediate/Advanced)
o Purpose
This tool organizes and summarizes your data in a table or chart
The big advantage is you can quickly and easily change the way
you organize or summarize your data
Also, making a chart is easier than ever
o Example
Raw Data
Pivot Table
Denial (All)
2
Sum of
Denial_Count Ins_Type
Grand
Site B D E H O R Total
106001 360 128 11 689 45 376 1609
107001 728 369 15 1070 94 1185 3461
Grand Total 1088 497 26 1759 139 1561 5070
3
To change the way your data is displayed, right click on the gray
cell that contains your Data Items Field (Sum of Denial Count,
green)
Click Field Settings and then click Options
Choose an option from the Show data as dropdown list
In the example below, I chose % of row
Instead of showing the sum of Denial Count as a number, it is
showing it as a percent of the total volume per row
This breaks down the volume of denials per Insurance Type on
a percentage basis
Sum of
Denial_Count Ins_Type
Grand
Site B D E H O R Total
106001 22.37% 7.96% 0.68% 42.82% 2.80% 23.37% 100.00%
107001 21.03% 10.66% 0.43% 30.92% 2.72% 34.24% 100.00%
108001 19.18% 27.52% 1.25% 29.44% 2.50% 20.10% 100.00%
108002 15.17% 18.68% 0.72% 22.36% 2.07% 41.00% 100.00%
108003 66.67% 0.00% 0.00% 33.33% 0.00% 0.00% 100.00%
108004 22.40% 8.01% 0.45% 30.54% 2.23% 36.37% 100.00%
108005 12.55% 26.15% 0.00% 25.36% 0.32% 35.64% 100.00%
Grand Total 19.07% 14.72% 0.53% 29.53% 2.15% 33.99% 100.00%
You can quickly view the details of any of the data presented in
your pivot table by double clicking on the appropriate cell
This will create a new worksheet with the all the detailed data you
want to see
If you change something in your raw data, you must refresh your
PivotTable for the change to take effect
To do this, right click anywhere in your PivotTable and click
Refresh Data
To move a field, click and hold the gray box that contains the field
you want to move, drag it where you want it, and let go
If you want to completely remove a field from your PivotTable,
then drag it outside the area of your PivotTable (you should see a
red “X” when it’s outside the area of your PivotTable)
You can add more than one field to the row and/or column areas of
your PivotTable
In the example below, I moved Insurance Type from the Column
Field and made it a second Row Field
This displays the same data but in a different format
If we made a PivotChart for this PivotTable it would also look
different than the PivotChart for the PivotTable in the 1st
example
Denial (All)
Sum of Denial_Count
Site Ins_Type Total
4
106001 B 360
D 128
E 11
H 689
O 45
R 376
106001 Total 1609
107001 B 728
D 369
E 15
H 1070
O 94
R 1185
107001 Total 3461
5
o How to use this function:
First go to Insert, and click Function
Search VLOOKUP and push OK
For the first field, Lookup_Value, enter a reference that contains
the value you want looked up (orange) (Eg: A2)
Your Lookup_Value (orange) must be a unique value in your
lookup table (blue)
In the next field, Table_array, you must enter the table (blue) that
excel will be searching in for your lookup value (orange)
The table must include the values related to your lookup values
(Site #) and any related information that you want the lookup to
return (State, Site Name)
The table can be in the sheet you are working in or it could be in a
different sheet in the same workbook
The easiest way to enter the reference for your table is to click in
the Table_Array field, click on the sheet the table is in, and then
highlight the entire table
Your table can contain two cell references, two column references,
or sometimes even two row references depending on your needs
and how you select your table (Eg: A8:C16, A:C, 8:16)
You generally want to make these references absolute by inserting
dollar signs before each letter and/or number (Eg: $A$8:$C$16,
$A:$C, $8:$16)
To make the entire reference absolute, you could alternatively
highlight the whole reference and push F4
In the next field we will designate what we want the formula to
return after it does the lookup and finds the value (Eg: State, Site
Name)
We designate this by giving a column number
We can determine the column number by manually counting from
left to right starting with the first column of the table we selected
earlier
The first column in the table is 1 the second is 2 and so on… (Eg:
State=2, Site Name=3)
If manually counting for your column number is impractical
then highlight your table, and as you highlight you should see a
number next to a “C” (C1, C2, C3)
This number will be right next to your cursor as you are
highlighting or in the white box at the top left of the page
Keep highlighting your table until you reach the column that
contains the information you want the formula to return
When you reach this column, look at the number next to the “C”
and this will be your column number
In the next field we can only enter either true or false
False looks for an exact match of your lookup value while true
looks for an approximate match
6
Generally, you will use false
Now push OK
Try the above example to get some practice
The formula to retrieve the state for site 107001 should read
=vlookup($A2, $A$8:$C$16,2,false)
The formula to retrieve the site name for site 107001 should read
=vlookup($A2, $A$8:$C$16,3,false)
Now you can copy and paste this formula to fill in the rest of your
missing information
o Understanding how to properly organize and select your table
One thing that is extremely important to understand about
vlookups is that they only search for the lookup value in the first
(leftmost) column of the table you select
This means that when selecting your table, you have to start with
the column that contains your lookup values and move to the right
It also means that the data that you want the lookup to return must
be to the right of the data you are looking up (See Example below)
7
o The importance of unique values
Another important thing to realize about vlookups is that the first
column of your lookup table must have unique values
For instance, in the example below, neither the first or last name is
unique
When a lookup of the last name “Smith” is performed, the function
only returns data from the first match it finds (Eg Smith, John’s
DOB)
Using last names the vlookup function cannot find the correct
DOB for Smith, Jane
8
First & Last Name First Name Last Name DOB Lookup
SmithJohn Smith John 1/1/2000
SmithJane Smith Jane 1/1/2001
DoeJohn Doe John
DoeJane Doe Jane
First & Last Name First Name Last Name Date of Birth
SmithJohn Smith John 1/1/2000
SmithJane Smith Jane 1/1/2001
DoeJohn Doe John 1/1/2002
DoeJane Doe Jane 1/1/2003
9
However, if any of your data contains actual text,
multiplying by 1 will give you an error. (#VALUE!)
To solve this problem, use autofilter and filter for
#VALUE!
Then enter a reference to the original column without
multiplying by 1
Then use this formula to fill in your filtered data (Note:
when you fill in the formula, it should only fill in the rows
that have the #VALUE! error)
o VLOOKUP across all sheets in a workbook
Normally, a VLOOKUP only looks in one sheet of a workbook
Therefore, if you have several workbooks, and you’re not sure
which contains your lookup values, you have to perform multiple
lookups
The code below these instructions creates a “user defined” function
that performs a VLOOKUP across all sheets in a workbook (rather
than just one sheet)
To use the code, push Alt + F11 while an excel file is open
A new screen should come up
Go to Insert at the top and click Module
Paste the code below into the new Module just created
Close out of this screen and return to Excel
Go to Insert, Function
There should be a dropdown list right next to “Or select a
category”
Choose User Defined from this dropdown list
A function titled LookAcrossSheets should come up
Select this function and click OK
For the field titled What, enter you lookup value
For the field titled Where, enter your lookup table (since this
function will look in all sheets, no sheet name is necessary, just a
range)
For the field titled Column, insert the column number that
contains the data you want the formula to return after it finds your
lookup value
To determine the column number, count from left to right
starting with the first column of the table you previously entered
For the field titled TorF, insert false if you want the lookup to
search for an exact match and insert true if you want it to only find
an approximate match
10
Dim Wsht As Worksheet
Dim FindIt
LookAcrossSheets = FindIt
End Function
o Data Validation
o Purpose: Allows you to limit what can be entered into a cell, range, or
sheet
o Examples: The following are some examples of how you can limit what
can be entered to a cell, range, or sheet
A number between 1 & 10
A date between 1/1/2010 & 12/31/2010
Text length of exactly 9 letters
o How to use this tool:
Select the cell, range, or entire sheet that you want to limit
Go to Data, and click Data Validation
Make sure you are under the Settings tab
Under Allow: you should see a dropdown list and Any value
should be currently selected
This dropdown list contains other selections like the examples I
gave above
After you make your selection, push OK
Now the cell, range, or sheet you had highlighted should be limited
according to what you selected
If you try to enter a value that does not meet the criteria you
entered, an error message will come up prompting you to Retry or
Cancel
To get rid of the limits you just created and allow any value to be
entered, reselect your cell, range, or sheet and go to Data
Validation and choose Any Value
o Data Validation - List
One unique selection in Data Validation is List
List allows you to limit what can be entered into a cell, range, or
sheet just like any other selection from Data Validation
The difference is it limits what can be entered according to what is
in the list that you designate/create
11
This allows you to customize the limits on what can be entered
To use this tool, go to Data Validation, and choose List
In the empty field at the bottom, enter the equal sign and the range
that contains the list you are willing to allow
The range you designate must be located in a single column or a
single row (Eg =A1:A10, =A:A, =1:1)
Alternatively, you could manually enter the list in the empty field
at the bottom
Simply type in the list separated by commas
Do not type an equal sign
After you have designated the list of values that you are willing to
allow, push OK
The cell, range, or sheet you limited should have a dropdown
arrow/list (like an autofilter) that comes up when you click on a
cell
This dropdown list contains all the values that are in the list you
designated
A value can be chosen from this list to be entered into the cell, but
no other value will be accepted in the cell
o HLOOKUP - (Difficulty Level: Intermediate/Advanced)
o Purpose: This function is used to fill in missing information, reconcile
information, and build dynamic reports
o What this function does: This tool looks horizontally for a value (orange)
in a separate table (yellow) When it finds the value, it returns the
information you ask for that is related to that value (Eg: 99283 Charge,
99284 Charge, 99285 Charge)
o The Hlookup function works the same as the Vlookup function except the
lookup values you are searching for (orange) are located horizontally in
the first row of your lookup table (yellow) rather than vertically in the first
column of your lookup table
o Everything mentioned previously for Vlookups applies exactly the same to
Hlookups
o Match Function
12
o Purpose
To return the position of a value in a single column or single row
This function can be combined with the VLOOKUP function to
automate the process of determining the Col_index_num (position
of the data you are trying to retrieve)
This function can be combined with the HLOOKUP function to
automate the process of determining the Row_index_num (position
of the data you are trying to retrieve)
o What this function does
This function looks up a value in a column or row and returns its
position in that column or row
The area Excel searches can consist of either one column or one
row
o Example
To determine the Position in column A of the Sites in column E,
the Match function was used
Notice the Position exactly matches the row number that our Sites
are in.
This is merely a coincidence and will only happen when the area
Excel is searching in (Lookup_Array) begins with row 1
Be aware that you can also return the position of data in a column
rather than a row
The position will still be a number
A B D E F
1 Site Site Position
2 107001 140007 4
3 116001 118001 7
4 140007 155001 10
5 121002 140005 13
6 115002
7 118001
8 121004
9 116002
10 155001
11 155004
12 155002
13 140005
13
The first field, Lookup_Value, is the value you want to know the
position of
The second field, Lookup_Array, is the area (single column or
single row) Excel will search to find your lookup value.
In the last field, Match_Type, you can either enter -1, 0, or 1
Generally you will enter 0 since it tells the function to search for
an exact match of your Lookup_Value
If you enter 1 it looks for the largest value less than or equal to the
Lookup_Value, but your Lookup_Array must be sorted in
ascending order
If you enter -1 the function looks for the smallest value that is
greater than or equal to the Lookup_Value, but your
Lookup_Array must be sorted in descending order
When using 0 to find an exact match, you may get an #N/A error
if the formula cannot find an exact match
You will also get the #N/A error if one of your values (Lookup
Value or Table Array) is formatted as text and the other is
formatted as a number
To change the formatting of the text to a number, use one of the
methods covered under VLOOKUP issues because of formatting
differences on page 9
o Count If Function
o Purpose
To get the volume of data that matches a specified condition
o What this function does
This function gives a count (volume) of everything in a range that
matches a specified condition
o Example
The yellow cell below is a count of all the allowed amounts that
are less than $105
14
o How to use this function:
o First go to Insert and click Function
o Search for COUNTIF, select COUNTIF, and push OK
o Excel is asking for two things, Range & Criteria
o The Range is simply the area you want a count of
o In the Criteria field, you designate the condition that the data in the Range
must match in order to be included in the count
o The Criteria field can contain a reference, an expression, or text
o Examples of expressions include greater than X, less than X, equal to X,
greater than or equal to X, less than or equal to X, does not equal X
o The following contains these same expressions in the same order but in the
correct format: >X <X =X >=X <=X <>X
o The Criteria field can even contain “” (open & close quotation marks)
which will count how many blank cells are in your range
o When you have finished entering your Range & Criteria, push OK
o Because you can only enter one range in the COUNTIF function, the
function can only test your condition (Criteria) on the same range that you
want counted
o The same is not true for the SUMIF function since you can enter two
different ranges
o Sum If Function
o Purpose
Like Subtotals and PivotTables, this function is used to summarize
data
One advantage is you can customize what data you want to
summarize by specifying a condition
One disadvantage is you can only use the sum function
o What this function does
This function performs a sum of all the data in a designated range
(Sum_Range) that has corresponding data (Range) that matches a
designated condition (Criteria)
o Example #1
The yellow cell below is a sum of all the Allowed Amounts that
are less than $105
15
99285 2490 30761 $ 163.00
99285 2490 30777 $ 172.00
99285 E114 30755 $ 244.22
99285 E114 30802 $ 244.22
$ 539.92
o How to use this function
First go to Insert and click Function
Search for SUMIF, select SUMIF, and push OK
Excel asks you to enter a Range, Criteria, & a Sum_range
Your Range is where Excel will look to see if your data matches
the condition we will designate (Column D, Allowed Amount)
In the Criteria field, you designate the condition that the Range
must match in order to be included in the sum (<$105)
The Criteria field can contain a reference, an expression, or text
Examples of expressions include greater than X, less than X, equal
to X, greater than or equal to X, less than or equal to X, does not
equal X
The following contains these same expressions in the same order
but in the correct format: >X <X =X >=X <=X <>X
In the Sum_Range field you must enter the range of data that you
want summed (Column D, Allowed Amount)
SUMIF is very similar to the COUNTIF function except it
performs a sum rather than a count and uses two ranges rather than
one
Two ranges are used for SUMIF so that the condition (criteria) can
be tested on a separate range if desired
Example #2: The example below is a sum of the allowed
amounts (Sum_Range) that have CPT’s (Range) equal to 99283
(Criteria)
o IF function
16
o Purpose
The function is used to determine what data meets a certain
condition and what data does not
o What this function does
This function performs a logical test on your data
A logical test is any value or expression that can be evaluated as
TRUE or FALSE
Examples of many different logical tests are located below
Take a look at the examples before reading on so you can
understand what a logical test is and how it is evaluated as TRUE
or FALSE
Now that you understand what a logical test is, you have to
understand what else an IF function does
After the function performs the designated logical test, it gives you
one value if the result of the test is TRUE and a different value if
the result of the test is FALSE
The values if TRUE and if FALSE returned by the function are
designated by the user
o Example
Expressions
The expressions in column B are various logical tests that
you can use in your IF function
Column C contains the meaning of the expressions
Column D contains the results of the various logical tests
when performed on A1 & A2
A B C D
Other Logical Tests
You can also use the following functions in the Logical
Test field as your logical test for you IF function
o ISNUMBER – Tests if a cell contains a number
o ISBLANK – Tests if a cell is blank
o ISERROR – Test if a cell contains an error
o How to use this function
17
First go to Insert and click Function
Search for IF, select IF, and push OK
The first thing Excel needs you to do is enter your Logical Test
This logical test should be what you are trying to determine about
your data
If you were trying to determine which data is greater than 100 then
you would enter data reference>100
In the next field you must enter what you would like the formula to
return if the result of your logical test is true (your data is >100)
In the last field you must enter what you would like the formula to
return if the result of your logical test is false (your data is <=100)
If you want the formula to return nothing when the logical test is
true then enter “” (open and close quotation marks) into the Value
if true field
You can enter the same thing into the Value if false field to have
the formula return nothing if the logical test result is false
o Tips & Tricks - (Difficulty Level: Easy)
o Quickly move or copy a worksheet(s) into the active workbook or into
other workbooks
Right click on the sheet you want to move or copy and select
Move or Copy
To move the sheet, simply select the desired location and push OK
To move it to a new or open workbook select the workbook from
the above dropdown list
To copy the sheet follow the same process, but before pushing OK
click in the white box next to Create a Copy
You can copy or move multiple worksheets by first selecting
multiple sheets (see below) and then performing this same process
o Select multiple worksheets
You can hold down the control key and click on and select
multiple worksheets at one time
You can also select a continuous range of worksheets by clicking
on the first worksheet in your range, pushing and holding shift, and
clicking in the last worksheet of your range
While multiple worksheets are selected, any change made to
one of the sheets is made to all of the sheets
This can be a very useful shortcut when several of the same things
need to be done to multiple worksheets
However, be aware that anything under the Data tab (Sort,
Subtotals) cannot be done while multiple worksheets are selected
Also, be sure to unselect your worksheets after you are done (See
below instructions)
o Unselect multiple worksheets
Right click a worksheet in your selected group and click Ungroup
Sheets
18
Alternatively, you could simply click on a worksheet that is not
currently selected in your group
Be aware that if all worksheets in the workbook are selected as a
group, clicking on any one of them will unselect your group
o Make special selections
Click Edit, then click Go To (Shortcut: Ctrl +G)
At the bottom left click Special
Now you can select any condition in this list and Excel will
highlight only the cells that match the condition
For instance, if you wanted to highlight only blank cells, choose
blank and push OK
o Simultaneously make the same entry into all cells selected
If you have several cells or a range selected, you can
simultaneously enter the same thing into all the cells selected
To do this, make your selection, type in what is desired, push and
hold control and push enter
19