Simple clear advice in plain English

Use Excel to calculate your working hours

Use an Excel formula to work out how many hours have been worked, excluding weekends

Q Our charity booth is open from 7:30am to 4:45pm everyday, except weekends.

Is there an Excel formula for calculating how many hours and minutes someone has worked there, allowing for them to be half an hour late on the first day and leaving half an hour early on the last day?
Ali Dhillon

A The NETWORKDAYS function can eliminate the Saturdays and Sundays from the result. A combination of MEDIAN and MOD can help calculate the rest. Format cells C6 and D6 to ‘ddd d/m/yyyy h:mm AM/PM’. Format cell E6:

[h]” hrs”:mm” mins”

The square brackets tell Excel to calculate elapsed time. The result is in hours and minutes. If the person starts half an hour late on the first day, say 30 June this year, enter in cell C6:

30/6/2009 08:00

If they leave half an hour early on 7 July, enter in D6:

7/7/2009 16:15

For the total time worked, in cell E6 enter:

=(NETWORKDAYS(C6,D6) 1)*(“16:45” “07:30”)+IF(NETWORKDAYS(D6,D6),MEDIAN(MOD(D6,1),”16:45”,”07:30”),”16:45”) MEDIAN(NETWORKDAYS(C6,C6)*MOD(C6,1),”16:45”,”07:30”)

The correct answer to this example is 54 hours 30 minutes.

Article tags

Reader Comments

   

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

Security shield illustration

How to use the Command Prompt

Lurking under Windows is the little-known world of the command line. We explain how to use this to fix faults and make your PC much more secure

Microsoft Excel remove unprintable characters screenshot

Get rid of those unprintable and annoying text characters in Excel

When completing an Excel spreadsheet you can be left with odd boxes cluttering up the cells. A simple formula deletes these so that what you see is what you get

Word's undo feature

How to fix common PC errors

It’s easy to hit the wrong key when using a PC and throw yourself into a panic. There's no need to worry - we have easy fixes for 30 common everyday errors

Question & 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

Q.How do I stop Windows 7 search?

> Read the answer

Best deals on the web

img

Apple iMac 21.5" (MC309)

£929.00- Buy it now

img

Dell Inspiron 620 ST Intel Core i3-2100 3.10GHz / 3GB / 500GB / DVDRW / Win 7 Home Premium

£299.00- Buy it now

img

Apple iMac 27" (MC813)

£1353.99- Buy it now

Great benefits for subscribers!

Poll

Which is your preferred web browser

Jargon Buster

Computing terms explained in plain English

CAD

Computer Aided Design. Software used to create 3D models.

Great shopping deals from Computeractive