Screenshot from Excel
Calculating a day's labour costs without getting bogged down in decimals

Hands on: Calculate hours and pay on an Excel spreadsheet

Handle calculations of time and money in Excel

Written by Stephen Wells

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.

reader comments

related articles

 

related whitepapers

today's top stories

WiMax: Threat or opportunity?

We examine the merits of WiMax and its benefits relative to other wireless technologies in our latest video 13 Oct 2008

Learning from the credit crunch to avoid a broadband crunch

While it might be the most pressing issue de jour , the financial system isn’t the only area where government needs to... 10 Oct 2008

How careerism can warp IT procurement

Many working in IT put their career interests before those of their employer when weighing up purchasing options 10 Oct 2008

The definitive guide to software development

Five key trends and five best practice tips to help you improve your programming capabilities 09 Oct 2008

Computing podcast - IT implications of the banking crisis, and the FSA clamps down on IT security

We discuss the effect of shotgun mergers and acquisitions on financial services IT staff, and examine the industry regulator's plan to fine directors for information security breaches 09 Oct 2008

Advertisement

Newsletter signup

Sign up for our range of FREE newsletters:

Existing User

Newsletter user login:

Jobs

Related jobs

Job of the week

Job alerts

Sign up here

Find your next job


IT Salary Checker

Check salary here

Advertisement

White papers

Search white papers

Top categories

VPN, Extranet and Intranet Solutions

WAN/ LAN Solutions

Network Security

Interoperability-Connectivity

Grid/ Utility Computing

Latest poll

Are you worried about your job prospects in IT over the next 12 months?

Are you worried about your job prospects in IT over the next 12 months?

Will the economic crisis affect your job prospects?

Previous poll results

Latest audio and video articles

Remote workerVideo

WiMax: Threat or opportunity?

We examine the merits of WiMax and its benefits relative to other wireless technologies in our latest video 13 Oct 2008

programming codeVideo

The definitive guide to software development

Five key trends and five best practice tips to help you improve your programming capabilities 09 Oct 2008

Latest in-depth articles

Financial Services Authority buildingAnalysis

FSA threatens executives with fines

Senior management to be held accountable for security lapses at banks 09 Oct 2008

Comment

Broadband must be a spending priority

For the economic health of the nation, the government would do better to bankroll an optical fibre rollout rather than prop up profligate banks 09 Oct 2008

Advertisement

Primary Navigation