Excel For Payroll: Presented by Jackie Williams C.P.S. The Association For Payroll Specialists

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Excel for Payroll

Presented by Jackie Williams C.P.S.


The Association for Payroll Specialists
Summary of topics to be covered:
• Pivot tables
• Concatenate function
• Split fields
• V-lookup
What is a pivot table?
• allows you to “drill down” to extract information from
your raw data.
• allows you to quickly summarize lists of data by category
without writing a single formula .
• data can be “pivoted,” or rearranged to be viewed from
different angles
• allows calculations on summarised data such as SUM,
MAX, MIN, AVERAGE, COUNT,
What is a pivot table?
• you can create reports that could take hours to create using formulas.
• pivot tables also have in-built sorting and filtering abilities
Before you create your pivot table
Data Rules:
• Don’t have blank rows in your data
• Don’t have blank columns in your data
• Make the column headings row bold
• Blank Cells should be replaced with zeros if possible
(you can use the find and replace function for this).

This ensures the data is not missed when you run the pivot table
and will speed up the development time for the pivot table
Create Pivot Table
Activity 1
1. Open Excel workbook – Pivot table example
2. Click anywhere inside the data table in worksheet Pivot
table activity 1
3. Click anywhere within the data to select the table to apply
the Pivot Table format to.
4. In the Insert ribbon tab click the Pivot Tables icon. Excel will
automatically “guess” where the data is based on our earlier
tables rules
Create Pivot Table

5. Select the range of data you wish to include in your


pivot table including the headings
Create Pivot Table

6. Select “Existing Worksheet” to place the pivot table in your existing worksheet
7. Select cell A12 for the location of your pivot table, then, click OK
Create Pivot Table

8. Using the left mouse button, drag the State field down to the Row Labels section
9. Drag the Taxable Gross, Tax Amount and Net Pay fields down to the Values section
Create Pivot Table

8. Using the left mouse button, drag the State field down to the Row Labels section
9. Drag the Taxable Gross, Tax Amount and Net Pay fields down to the Values section
To pivot the Pivot Table

10. Drag the State field to the Column section


11. Drag the Ʃ Values field to the Row section
Create Pivot Table on a separate worksheet
Activity 2
1. Open Excel workbook – Payslip Data
2. Click anywhere inside the data table in worksheet Pivot
Table exercise
3. Click anywhere within the data to select the table to apply
the Pivot Table format to.
4. In the Insert ribbon tab click the Pivot Tables icon. Excel will
automatically “guess” where the data is based on our tables
rules above.
Create Pivot Table on a separate worksheet

3. Select “New Worksheet”. Click OK


Create Pivot Table on a separate worksheet

2. Drag the Payroll Item field to the Row section


3. Drag the State field to the Column section
4. Drag the Value field to the Ʃ Value section
Create Pivot Table on a separate worksheet
Formatting Pivot Table
• To format the values in the Pivot Table select any cell
in the Values section, then right click and select
Number format, then select Currency.
• To ensure your column headings are displaying the
correct field names select the Design tab on the Pivot
Table tools, then select Report Layout, then select
Show in Tabular Form.
• Add a style, go to Design tab on the Pivot Table tools
and select a Style and tick Banded Rows and Banded
Columns
Formatting Pivot Table
Add a Slicer box to your Pivot Table
• To enable data to be filtered interactively select the Options tab on the
Pivot Table tools, then select Insert Slicer, then select Period Ending
Date and click OK.
• If you click on the date 31/07/2017 you will only see the data relating to
that pay period.
Select the pay items to include in your payroll
tax calculation (adding a filter)
Click on the drop down box next to the Hours or A/D Code Desc
Header and untick any pay items you don’t want to include in the
payroll tax calculation.
Other useful excel functions - Concatenate
Concatenate
The concatenate function allows the user to combine
information in two fields into one field without losing the
original fields.
Example
Combine First Name and Last Name together to make one
field called Full Name in the Paylip Data spreadsheet.
Other useful excel functions - Concatenate
Activity 3 - Open Concatenate file
• Insert a column to the right of the fields you want to
combine (select column to the right of the field where
you want the new column to appear, then right click and
insert).
• Add the header Full Name to the new column.
Other useful excel functions - Concatenate
Steps
Select the first cell under the heading (D2), then in the formula bar type the
following formula then press Enter.
• B2 represents the Surname,
• “ ” represents a text component (in this case we are adding a space
between the Surname and the First Name,
• C2 represents the First Name.
• Each component is separated by a comma.
Other useful excel functions - Concatenate
Steps
You can now copy the formula down to other cells in the
column using the fill handle.
Other useful excel functions – Split Columns
If you want to split data in a single column into two or more
separate columns you can use the “text to columns”
command on the Data tab.
Example
You want to split the Full Name field into separate columns
for Last Name and First Name.
Other useful excel functions – Split Columns
Activity 4
• Select the Full Name column in the Split exercise
workbook.
• Go to the Data tab and click on the Text to Columns
command in the Data Tools group of commands.
Other useful excel functions – Split Columns
Steps
Click on Next
Other useful excel functions – Split Columns
Steps
Select the “separated by space” option and click Next.
Other useful excel functions – Split Columns
Steps
Click Finish to complete task.
Other useful excel functions – Split Columns
Steps
You can now re-name the new column headings and use
the Concatenate function to combine the First Name and
Middle Name Fields.
Other useful excel functions – Split Columns
Steps
You will then need to copy and paste the First Name
column (using the “Paste as Value” option) before deleting
the obsolete columns.
VLOOKUP FUNCTION – What does it do?
• A lookup function that can be used to quickly retrieve
information from a table. E.g. if you have a table of
employee data, you could search for the date of birth
of a specific employee
• The VLOOKUP function will look in the leftmost column
of a table for the value specified.
• When it finds the value specified, it will return a value
that is located in the same row.
• The returned value will be delivered to your selected
cell.
VLOOKUP FUNCTION – What we will cover

1 VLOOKUP- V = Vertical
2 VLOOKUP Delivers a value to a cell (exact match)
4 Using absolute references in a VLOOKUP formula
5 Copying and pasting a VLOOKUP formula
6 VLOOKUP Delivers a value to a cell (approximate match)
7 Using an IFERROR where VLOOKUP returns a #N/A error
VLOOKUP FUNCTION – Exact match
Activity 5
Open the file: Employee Details.xlsx
Go to the “Terminations” worksheet and select the cell
reference that you want to deliver the value to (B3). Click
the fx formula button and search for the VLOOKUP
function, then press OK
VLOOKUP FUNCTION – Exact match
VLOOKUP FUNCTION – Exact match

• The Look-up value is the ID Number (Cell B2), we will look up the
• ID Number in the Employee Details table and
• search for the Full Name of the employee located in column 2 (Col_index_num)
• then deliver it to cell reference B3 on the Terminations worksheet.
• For exact match we type FALSE next to Range_lookup
VLOOKUP FUNCTION – Exact match
VLOOKUP FUNCTION – Exact match
VLOOKUP FUNCTION – Using absolute references
If you want to copy and paste your VLOOKUP formula to other cells within the
Termination worksheet you will need to lock the Lookup value and Table array
range in your formula.
If you don’t do this the copy and paste function will relate the formula to the next
row down in the data and you will get an error message.
VLOOKUP FUNCTION – Using absolute references
You can create an absolute reference by highlighting the
range you want to lock in the formula bar and pressing the F4
formula button. This will place $ signs around the locked
data. We are locking the lookup value and table array.

Not locked

Locked
VLOOKUP FUNCTION – Copying & pasting a formula
Once the absolute references are set
You can now copy and paste your formula. This way the only
thing that I will need to change in the VLOOKUP formula is the
column index number for the relevant data that I am looking up.
VLOOKUP FUNCTION – Closest match
What if we don’t have an exact match and are referring to a
range of data?
In the example below we are calculating the preservation age of
the employee based on a particular date range. In this case when
we perform our VLOOKUP we will be looking for the closest
match. So in the range_lookup value we will enter TRUE.
VLOOKUP FUNCTION – Closest match
Excel will look up
the date of birth
in column G (first
column in the
table array) and if
the lookup value
at E2 is equal or
greater than the
value in column G
it will return the
value in column I
(Preservation Age)
to cell E3
(Preservation age).
It will search until
it finds the closest
match.
VLOOKUP returns an error message #N/A?
In this case I can use the IFERROR function in my VLOOKUP
formula so that if the error message comes up VLOOKUP will
return a required message e.g. “incorrect ID number”.
Example: ID number 21609 does not exist, so we have an error
message.
VLOOKUP returns an error message #N/A?

We have inserted the VLOOKUP formula into an IFERROR


formula.
Remember to put an extra bracket at the end of your formula
because you have added a formula within a formula.
VLOOKUP returns an error message #N/A?

We are saying that if they is an #N/A error we want to insert


the text “Incorrect ID”, and if not we want to put the VLOOKUP
value (exact match).
VLOOKUP – Using data validation
If you want to avoid entering an incorrect ID number and
eliminate the need to use the IFERROR function you could use
data validation. Select “List” from the drop down menu and
select the ID number range you want to refer to.
VLOOKUP – Using data validation

You can now see a drop down list box next to the cell B2 (ID Number).
ANY QUESTIONS?

You might also like