Skip to Content
Excel Annoyances
book

Excel Annoyances

by Curtis D. Frye
December 2004
Beginner
256 pages
10h 49m
English
O'Reilly Media, Inc.
Content preview from Excel Annoyances

DATE AND TIME ANNOYANCES

DISPLAY PARTIAL HOURS AS DECIMAL NUMBERS

The Annoyance:

I’m a private consultant, and I would like to create a time sheet for myself using Excel. But I’m having a devil of a time getting Excel to subtract time and output total hours to one decimal place. For instance, I formatted all the cells used in the calculation with the hh:mm:ss time format, which means that when it subtracts 7:00:00 from 12:00:00, it shows I worked 5:00:00 hours in the morning (see Figure 3-16) instead of 5.0. When I put in the afternoon time (start 12:30:00, stop 17:00:00, or 4.5 hours worth) it shows the total time I worked as 9:30:00. How do I make Excel display the time worked as decimal values—in this case, 5.0, 4.5, and 9.5 hours?

You shortchange yourself when you multiply a time serial number by an hourly rate.

Figure 3-18. You shortchange yourself when you multiply a time serial number by an hourly rate.

The Fix:

To display a time as a decimal value, such as 9.5 hours, follow these steps:

  1. Click the cell where the result is to appear and select Format Cells, click the Number tab, and select Number from the Category pull-down list.

  2. Type this formula in the cell: =HOUR(value)+(MINUTE(value)/60), replacing value with the address of the cell that contains the time or the formula that generates the time you want to convert into a decimal value. In the worksheet shown in Figure 3-16, you would use the formula =HOUR(E4)+(MINUTE(E4)/60).

ROUND HOURS TO THE NEXT TENTH OF ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Excel 2000 in a Nutshell

Excel 2000 in a Nutshell

Jinjer Simon

Publisher Resources

ISBN: 0596007280Catalog PageErrata