Simple clear advice in plain English

Hands on: Calculate hours and pay on an Excel spreadsheet

Handle calculations of time and money in Excel

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

Helpful

I just wish I could get the original s/sheet to a size that I can read it. Dave Hughes

Posted by Dave Hughes, 05 May 2009

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

dice-tool

DiceTool makes short work of games that need plenty of dice rolls

Ideal for table top gaming, DiceTool can simulate the rolling of many different kinds of dice

np-340-seanmagarey

Why does my keyboard display the wrong characters on-screen?

Pressing certain letters on a keyboard results in unwanted numbers appearing

337-f3-lp

How to sort lists easily in Word, Excel and Open Office columns

Microsoft Office and Open Office word processing and spreadsheet programs have simple ways of sorting lists of data in tables and spreadsheets

Question & Answer

Q.How do I store musician and other information about...

> Read the answer

Q.Why can't my browser find the website address I typed...

> Read the answer

Q.All updates have been downloaded, so why won't Windows...

> Read the answer

Best deals on the web

img

Apple MacBook Pro (MC724LL/A)

£999.99- Buy it now

img

Sony Vaio VPCF23P1E/B

£679.98- Buy it now

img

Sony Vaio VPCEH1J1E/W

£349.99- Buy it now

Great benefits for subscribers!

Poll

Which is your preferred web browser

Jargon Buster

Computing terms explained in plain English

Bios

Basic Input Output System. Essential software built into every PC that connects the vital components....

Great shopping deals from Computeractive