Payroll Spreadsheet
Formulas, Functions, Logical Statements, and Lookups
Calculating Pay
Gross Pay = Regular Pay + Over Time Pay
Regular Pay
is the Hours Worked
less than or equal to 40
times hourly wage
Regular Hours
This Uses Two Formulas…
If the hours worked are under 40,
then it’s Hours Worked Times the Wage
20 hours * $10 per hour = $200 that week
Regular Hours
BUT…
If the hours worked are over 40,
then to calculate the regular wage
we take 40 times the hourly wage
(with Overtime calculated later..)
40 hours regular time * $10 wage = $400
So, how do we connect two formula
options?
We use an IF Statement
If the hours < 40, then hours * wage
else, 40 * wage
OR
If(hrs <40,hrs*wage,40*wage)
Now, in Excel
=if(statement, if true, if false)
Use the mouse to click on
the cell when building the
formula
Base Work Hours was used,
rather than typing 40
Use the F4 Key to lock down
the base work hours, so
when it’s copied, it doesn’t
shift
Overtime Wage
Overtime Pay is the Hours worked over 40,
times the hourly wage,
multiplied by the Overtime Rate
Hours Worked – 40 * Wage * Overtime Rate
BUT, if there are not over 40, we don’t want to return
a negative number. 30 hrs – 40 = -10!
So we need another IF Statement
If the hours are under 40, then we’ll do nothing.
Otherwise we can run our formula for overtime.
So…
If (hrs < 40, then 0, (else hrs – 40) * wage * OT Rate)
Know why ( ) are there?
Order of Progression, otherwise the – happens last!
Now in Excel…
Use $ with BOTH the..
Base Work Hours
(B21)
Overtime Rate
(B22)
The $ Lock down the
assumptions
Use ( ) around the
base work hrs – hrs
worked.
Remember:
P.E.M.D.A.S.!
Gross Pay?
The gross pay is the total of the regular pay and
overtime pay.
So, add the regular pay with the overtime pay.
Do not use any $, we want these to change when
copied.
So do this one quickly, and then we’ll tackle Taxable Pay
Taxable Pay
The taxable pay is the difference between the gross
pay and the product of the number of dependents
and deduction per dependent.
The dependent deductible is $50 (cell B24), we then
multiply this versus their number of dependents, and
reduce the Gross Pay by this amount
Gross Pay – Deductible * Dependents
Now in Excel…
Use the Deduct
per Depend in B24
Remember to use
the F4 key to lock
it down with $
Federal Withholding Tax
Federal withholding tax is calculated on the taxable
pay based on the tax table.
This means we use the Taxable Pay, compare it to the
table at B21:E25, to find the Tax Rate.
Then multiply this tax rate against their Taxable Pay
to find out how much tax to charge
Lookup Statements
Lookup statements are used to return information
from a table.
The consist of 4 parts
The lookup value – what we are looking up
The Table Array – where are we looking
The Column Number – which column has the answer
Is the Lookup Value in the chart, or should it look for a
close one? True (Range) or False (Exact)
Let’s build the vlookup
It’s a Vlookup, as the table is Vertical. Otherwise it
would be a Hlookup.
The Lookup Value is Taxable Pay
The Table Array is D21:E25
The Column is 2
And Close is good enough, so True
This should return for Abram 25%
It should look like this…
But wait, there’s more!
25% is not the answer, it’s just the tax rate
We need to multiple this tax rate against the Taxable
Pay.
Use F2 to Edit the formula, then add to the end * H5
Now in Excel…
Now an easy one, FICA
FICA is calculated on the employee's gross pay.
FICA is just a flat percentage rate, found in B23.
Use the $ to lock down this percentage rate in your
formula
Let’s finish the line; Net Pay
Net Pay is what you have after all the taxes are paid
Take GROSS Pay, and reduce it by Federal
Withholding Tax AND FICA
Ignore Taxable Pay
Format, then Copy Down to
Complete
Format all the formulas we just made in to
Accounting Number style
Highlight E5 through K5, then copy it down with;
Either the fill handle or,
Copy/Paste to each row below
If your bottom answer doesn’t look like this, Un Do
and go check you have the right cells locked down!
Calculate Totals, Average, Min/Max
Use the Sum, Average, Min and Max formulas to
complete Row 17 and the table at I21:K24
Format the values to match the formatting used in
the Payroll calculations
Reduce any decimals to 2
The Completed Sheet