Screenshot from Excel
Calculating a day's labour costs without getting bogged down in decimals
R E L A T E D   C O N T E N T
ADVERTISEMENT

Hands on: Calculate hours and pay on an Excel spreadsheet

Handle calculations of time and money in Excel

Stephen Wells, Personal Computer World 25 Jul 2008
ADVERTISEMENT

Calculations of time are among the most frequent uses of Excel, and the most confusing.

You might accept that a spreadsheet stores a decimal fraction of a day as a record of time and displays hours and minutes like a digital clock but still be unable to get Excel to do what you want.

So it’s worth going over a few examples, starting with a record of a day’s labour costs.

The staff members’ names are in column A, start times in B, finish times in C, total hours worked that day in D, the particular staff member’s hourly rate in E, and the total labour cost for the staff member in F.

Highlight B2:C12. Right-click and choose Format Cells, Custom and in the Type: box enter

h:mm AM/PM

Highlight D2:D12 and use the Number format with two decimals. Format E2:F12 as Accounting with two decimals.

For staff member Art, enter 9:00 in cell B2 and 17:00 (which is 5pm in 24-hour time) in C2. In D2 enter

=(C2-B2)*24

To see why, click on B2 and press Ctrl and ` (the key to the left of 1 on the top row of the keyboard). You’ll see that the number stored in B2 is 0.375. That’s because time is stored in spreadsheets as a decimal fraction of a day. Multiply 0.375 times 24 and the answer is 9 or 9am. The number stored in C2 is 0.70833 recurring. Multiply that by 24 and the answer is 17, representing 5pm.

The entries in B2:C12 are in hours and minutes. The formulas in column D convert the difference between the entries in columns B and C to hours and decimal fractions of an hour. Someone who has worked from 11am to 5:15pm has worked 6.25 hours.

Complete the entries in A2:C12 and drag the formula D2 down column D. From here it’s easy. Enter the hourly rates in column E. In cell F2 enter =D2*E2 and drag this formula down column F. Column F now tells us the day’s labour costs for all staff members.

An individual timesheet
Let’s move on to something a little more complex, the timesheet for a self-employed person who works odd hours, often at night. Type in the labels shown in column A in screen 2. In cell B2 enter the date of the Sunday of the week to be recorded. Highlight the range B4:H4 and give it the Custom format

ddd mmm d

In B4 enter =B2. In C4 enter B4+1. Point to the lower right of the cell and drag along to H4 which should read, in the Formula Bar, G4+1.

On the Tools menu, choose Options, View and remove the check from the Zero values box. In Excel 2007, choose Office, Excel Options, Advanced, Display options for this worksheet, and remove the check against ‘Show a zero in cells that have zero value’. Click OK. A timesheet looks neater if blank cells don’t contain zeros.

Hourly rates can remain confidential if they don’t appear on the worksheet. Put them in Names instead. Press Ctrl & F3. In the ‘Names in workbook’ box enter Regular. In the ‘Refers to:’ box enter 16 if you want to make the regular hourly rate £16.00. Similarly Name hourly rates for Overtime and Sunday.


All Software Applications
Tags: Hands On, Spreadsheets, Excel

Like this story? Spread the news by clicking below:

Post this to Delicious del.icio.us    Post this to Digg Digg this    Post this to reddit reddit!

Permalink for this story
M A R K E T P L A C E
Get your free demo of Numara Track-It! 8 - the leading help desk solution for IT related issues.
Make presentations, review documents & share your entire desktop. 30-day free trial! (cc required).
Discover how remote support can fuel your IT business in ways you've never thought of before.
Apply ITIL best practices at your service desk while eliminating integration cost. Learn more here.
WAN based, automated, daily vulnerability assessments. Click here to try and request our whitepapers.
Have your product or service listed here >   
Sponsored links
F E A T U R E D   J O B S
London, United Kingdom | BP
Project Manager - £ Competitive - London About BP Our business is the exploration, production, refining, trading and distribution of energy. This is what we do, and we do it on a truly global scale. ... more >
Solihull, United Kingdom | Enzen Global Limited
Business Consultant - £35,000 - £40,000 - Solihull We are in need of a Business Consultant with strong analytical skills and a penchant for learning the domain knowledge of the Utilities sector (Gas industry in ... more >
London, United Kingdom | BP
 IT Leader -£ Competitive - London About BP Our business is the exploration, production, refining, trading and distribution of energy. This is what we do, and we do it on a truly global scale. With ... more >
Hertfordshire, United Kingdom | Tesco.com
Solution Architect Lead Hertfordshire Who's behind the world's most successful online retailer?Just over 10 years ago we started Tesco.com (aka Dotcom). Today, we've an incredible 750,000 active customers and sales at just under £1 billion. We ... more >
More job opportunities