Skylarking

The Tech Tip Blog
TigerDirect Back-to-School 2010

Browsing Posts in Excel

Friday evening I was meeting some friends for dinner. One of the worked at a law office on Seventh Avenue, so I met them at their office beforehand. They were performing some calculations on an Excel spreadsheet at the time, and as they were copying and pasting a repetitive formula, I showed them this trick which I am now sharing with you. This technique works with Excel 2003 and Excel 2007.

Sometimes you may want to use a formula or function repeatedly. In such a case you can easily copy the formula from one consecutive cell to another by using the fill handle of the active cell. The fill handle is the small square that appears in the lower right corner of an active cell.

To Copy A Formula With The Fill Handle

  1. Activate the cell that contains the formula you want to copy. (This typically done by clicking on the cell).
  2. Use the mouse to grab the fill handle. (Move the mouse close enough to the fill handle so that the mouse turns into a small black cross. When you see the small black cross, hold down the left mouse button.)
  3. While holding down the left mouse button, drag the mouse down for as many rows as you would like to copy to. Then release the left mouse button.
Fill Handle Usage

Fill Handle Usage

That’s it! The references used in the formula will be updated to match the new rows, so that the answers will be correct for the new rows.


Post Comments or Questions with the link below. Keep up-to-date with Skylarking: By Email or RSS Newsfeed or on Twitter. You can also send questions with my email form.

  • Share/Bookmark

A client of mine asked me to setup a worksheet for them that calculates the number of hours they worked in a day based upon the time they arrived at work and the time they left. They also wanted it to deduct the number of hours they took for lunchbreaks.

Here’s the simple spreadsheet I setup for them using Microsoft Excel:

Hours Worked Spreadsheet

Hours Worked Spreadsheet

Columns A and B were used to fill in the days and dates. Columns C and D were used to enter the times they came and went each day. Column E indicates time taken for lunch. Finally, column F performs the calculations.

In cell F3, the end of the row for Monday, the following formula was used:

=24*(IF(C3>D3,D3+1-C3,D3-C3))-E3

That formula was then copied and pasted into the rows below.

It may seem a little complex, but it’s a very versatile formula. Since they occasionally work a night shift, they sometimes leave work after midnight. Leaving after midnight means they left in the AM, and the formula, C3>D3, will be able to detect if they came in during the PM hours and left in the AM hours.

A regular 9 AM to 5 PM workshift is calculated as =24*(D3-C3)-E3. The portion in parentheses calculates the difference between the time they arrived and the time they left. The 24* converts it to hours out of 24 hour day, and the -E3 deducts their lunchbreak.

If they work a nightshift the Excel uses the formula =24*(D3+1-C3)-E3. The portion D3+1 indicates that they left work in the AM of the following day.

Post Comments or Questions with the link below. Keep up-to-date with Skylarking: By Email or RSS Newsfeed or on Twitter. You can also send questions with my email form. I’m looking forward to hearing from you.


  • Share/Bookmark
Powered by WordPress Web Design by SRS Solutions © 2008 — 2010 Skylarking The Tech Tip Blog Design by SRS Solutions and modified by Skylark NetWorks