How to Perform Time Period Calculations in Excel

Time Calculations in Excel

Time Calculations in Excel

Judging by the number of calls that I get from my viewers, working with Time Period Calculations is one of the most problematic challenges in Excel. My goal for this tutorial is to demonstrate how you can easily avoid the frustrations when you calculate elapsed time and total a series of time – e.g. hours worked during the week.

Apply a Custom Format to Formula Cells

When you create an Excel Formula that subtracts a Start Time from an End Time, you are likely to get a result that looks like 2:30 AM. This is not what you want to see! The solution is to apply a Custom Time Format – e.g. h:mm – to the formula cell(s).

Time that “Spans Midnight”

Many people work the “Graveyard Shift.” The start work late in the evening and they end work early the next morning. The problem that occurs when you want to calculate the number of hours worked is that Excel believes that you are performing a “negative time” operation and the result is a cell filled with ######## (Hash Marks). This happens because Excel thinks that both the Start Time and the End Time belong in the same day. To solve this, you could use an IF() Function formula. However, there is a much easier formula to use as I demonstrate in this video. It uses the MOD() Function.

Total Hours Worked

Use the SUM() function to total 8:00 hours worked each weekday. You are expecting to see 40:00 hours worked. So why does Excel return 16:00 hours instead? By default, Excel interprets 24:00 hours as a single day. So it subtracts 24:00 from the 40:00 hours worked to return 16:00 hours. Unless you make a formatting change to the formula cell you are going to have many unhappy and under paid employees.

The solution? Apply the [h]:mm Custom Formatting to the Formula Cells. Amazingly enough, Excel does not include [h]:mm as one of the Custom Formats in the list. So, simply edit one of the other formats and you will now have the correct answer displayed for your formula!

Learn More Tips for Excel

I invite you to visit my secure online shopping website – http:shop.thecompanyrocks.com – to preview all of the resources that I offer including “The 50 Best Tips for Excel 2007” DVD-ROM.

Subscribe to the “Danny Rocks Tips and Timesavers” Video Podcast on iTunes

I offer a free video podcast for many of my video tutorials at the iTunes Store. Follow this link to see all of the Podcasts that I have posted. If you like what you see, I invite you to subscribe to this free service.

Watch Tutorial in High Definition

You can view this tutorial in High Definition on my YouTube Channel – DannyRocksExcels.

 

How to Apply Alternate Row Shading Using Conditional Formatting in Excel

Alternate Row Shading

Alternate Row Shading w/ Conditional Formatting

This is the first tutorial in a new series. In collaboration with my good friend, Alan Friedman – CPA and partner with the firm Friedman, Kannenberg & Co., PC – I am using Alan’s Financial worksheets to demonstrate how to get the most out of Excel. In this lesson, I show you how to apply Alternate Row Shading – aka “Green Bar Shading” – to a Year-end Inventory Analysis Excel worksheet.

Conditional Formatting in Excel

In this lesson, I create a new rule that uses a formula to determine the “condition” – or criteria – that must be met in order to apply the “formatting” to my selection of cells. The “key” to understanding this rule: The formula that you use for this “rule” must return either TRUE or FALSE. The cells – in the selection – that evaluate to TRUE will receive the special formatting – a background shading.

Extending Range of Cells to Receive Conditional Formatting

In general, you can use Excel’s AutoFill Handle to extend Conditional Formatting to adjacent cells. If, however, you want to apply the “Rule Using a Formula” to non-adjacent cells, first copy a cell that contains the Conditional Formatting. Then, use Paste Special – Formatting to apply this rule to your new selection of cells.

Resources for This Tutorial

I invite you to visit my secure online shopping website – http://shop.thecompanyrocks.com – to preview all of the resources that I offer to you.

Please visit the Friedman, Kanneberg & Co. website to download the worksheet used in this series of lessons – and other seminar handouts.

 

Watch Tutorial in High Definition

Follow this link to watch this Excel Tutorial in High Definition on my YouTube Channel – DannyRocksExcels

Play Video Now