Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Time

From: Excel 2003 Essential Training

Video: Time

If you haven't already clicked on the Time Sheets tab, go ahead and do that now. You should be looking at this example of a timesheet. Working with the addition and subtraction of time inside a spreadsheet like Microsoft Excel should be as easy as pie, but sometimes you can really pull your hair out. Usually those are the times when you've got your cell formatting incorrect. For example, this simple formula found here in C18 will do the math on Monday, January 12th; in at 10 AM, out at 5 PM, 7 hours worked, straightforward. Now if I had that cell formatted incorrectly. Let me just change this. Say, for example, I was using a time format, such as this one, now it's going to look like just any other time value on my sheet. Well we're not going to fall into that trap I know, but your first instinct would probably be to switch it to a time like this. Well, now that looks right. The problem with that time format is it doesn't handle any more than 12 hours. For example this simple formula sums the values found in this row and adds them here. Well it's obvious that 8 and 8 and 8 is 24, plus 4 is 28, plus 7 1/2 that's 35 1/2 hours, and this employee is only getting credited for 11 1/2. The reason has nothing to do with the formula that we're using. It has everything to do with the formatting on the cell. If you want to allow your time values to stretch beyond the 12 hours, you need to set the format as such. Let's go down to Custom, this time value, with the h in brackets uses 24 hour time and will allow a time value to exceed even 24 hours. Unfortunately we don't want the sections included, and the @ symbol is extraneous, so Im just going to back that up and we'll use that, and there we go; 35 1/2 hours. So the key to having the math work was having that cell formatted correctly and putting the h in square brackets allows that cell to display a time value greater than 24 hours. Now let's go back down here to C18. This simple formula for calculating the hours worked in a day, it works fine when you're In in the morning and Out in evening, which is going to cover 99% of everybody's workday anyway. But what happens if you're working nights, where you start in the evening and end in the morning. For example, if 10 AM were to become 10 PM, this formula falls apart. Subtracting the In time from the Out time falls apart when the In time seems to be greater than the Out time. That's where your If statement comes into play. Take a look at this formula. This formula says is your Out time less than your In time? If that's true, then add a full day to your Out time, and then subtract your In time, then you'll get an accurate result. If it's false then just go ahead and subtract your In time from your Out time. With this intelligent conditional statement, you can handle time values that seemed to start before they end.

Time

If you haven't already clicked on the Time Sheets tab, go ahead and do that now. You should be looking at this example of a timesheet. Working with the addition and subtraction of time inside a spreadsheet like Microsoft Excel should be as easy as pie, but sometimes you can really pull your hair out. Usually those are the times when you've got your cell formatting incorrect. For example, this simple formula found here in C18 will do the math on Monday, January 12th; in at 10 AM, out at 5 PM, 7 hours worked, straightforward. Now if I had that cell formatted incorrectly. Let me just change this. Say, for example, I was using a time format, such as this one, now it's going to look like just any other time value on my sheet. Well we're not going to fall into that trap I know, but your first instinct would probably be to switch it to a time like this. Well, now that looks right. The problem with that time format is it doesn't handle any more than 12 hours. For example this simple formula sums the values found in this row and adds them here. Well it's obvious that 8 and 8 and 8 is 24, plus 4 is 28, plus 7 1/2 that's 35 1/2 hours, and this employee is only getting credited for 11 1/2. The reason has nothing to do with the formula that we're using. It has everything to do with the formatting on the cell. If you want to allow your time values to stretch beyond the 12 hours, you need to set the format as such. Let's go down to Custom, this time value, with the h in brackets uses 24 hour time and will allow a time value to exceed even 24 hours. Unfortunately we don't want the sections included, and the @ symbol is extraneous, so Im just going to back that up and we'll use that, and there we go; 35 1/2 hours. So the key to having the math work was having that cell formatted correctly and putting the h in square brackets allows that cell to display a time value greater than 24 hours. Now let's go back down here to C18. This simple formula for calculating the hours worked in a day, it works fine when you're In in the morning and Out in evening, which is going to cover 99% of everybody's workday anyway. But what happens if you're working nights, where you start in the evening and end in the morning. For example, if 10 AM were to become 10 PM, this formula falls apart. Subtracting the In time from the Out time falls apart when the In time seems to be greater than the Out time. That's where your If statement comes into play. Take a look at this formula. This formula says is your Out time less than your In time? If that's true, then add a full day to your Out time, and then subtract your In time, then you'll get an accurate result. If it's false then just go ahead and subtract your In time from your Out time. With this intelligent conditional statement, you can handle time values that seemed to start before they end.

Let's copy this formula down to the cell below. Copy and Paste. Because they were relative cell references, it's updated all of the cells involved in creating this formula. As you can see we're looking now at C16 and B16 and the conditions that apply there. Now starting at 10 PM the night before and finishing at 5 PM the day after, whew that's a long shift, but at least it's accurately calculated that if you have worked a 19 hour shift and of course another key to making sure this formula never breaks down is to format the cell with the square bracketed h followed by your minutes.

Show transcript

This video is part of

Image for Excel 2003 Essential Training
Excel 2003 Essential Training

65 video lessons · 52700 viewers

Mark Swift
Author

 
Expand all | Collapse all
  1. 16s
    1. Welcome
      16s
  2. 22m 44s
    1. Spreadsheet uses
      1m 59s
    2. Toolbars and menus
      8m 53s
    3. Moving around
      8m 1s
    4. Getting help
      3m 51s
  3. 18m 43s
    1. Opening new workbooks
      5m 13s
    2. Entering data
      6m 12s
    3. Commenting and saving
      7m 18s
  4. 17m 31s
    1. Opening worksheets
      1m 55s
    2. Add and delete worksheets
      2m 23s
    3. Insert and delete cells
      3m 46s
    4. Worksheet data
      9m 27s
  5. 36m 0s
    1. Width and height
      6m 7s
    2. Numeric formats
      6m 1s
    3. Alignment of data
      3m 43s
    4. Naming cells and ranges
      5m 48s
    5. Naming constants
      1m 52s
    6. Creating lists
      5m 48s
    7. Autofilter
      4m 13s
    8. Designated lists
      2m 28s
  6. 11m 19s
    1. Print options
      5m 51s
    2. Printing and hiding data
      1m 58s
    3. Headers and footers
      3m 30s
  7. 21m 52s
    1. Creating formulas
      6m 30s
    2. Relative and absolute
      6m 1s
    3. External references
      6m 0s
    4. Named constants
      3m 21s
  8. 7m 47s
    1. Functions
      7m 47s
  9. 19m 6s
    1. Fonts and merging
      3m 52s
    2. Rotate and indent
      1m 47s
    3. Borders
      2m 41s
    4. Shading and format painter
      2m 30s
    5. Rename and color worksheet tabs
      1m 52s
    6. Working with pictures
      6m 24s
  10. 11m 31s
    1. Templates
      3m 45s
    2. Styles
      3m 55s
    3. Autoformat
      55s
    4. Smart documents
      2m 56s
  11. 13m 15s
    1. Chart terminology
      2m 23s
    2. Chart wizard
      5m 10s
    3. Formatting charts
      3m 22s
    4. Inserting images
      1m 42s
    5. Printing charts
      38s
  12. 5m 1s
    1. File search
      1m 51s
    2. Find and replace
      3m 10s
  13. 8m 19s
    1. Import from Word
      1m 17s
    2. Delimited data
      2m 53s
    3. Import from the web
      1m 49s
    4. Exporting data
      2m 20s
  14. 7m 54s
    1. Consolidation
      5m 12s
    2. 3D formulas
      2m 42s
  15. 5m 33s
    1. Multiple panes
      1m 12s
    2. More screen options
      4m 21s
  16. 13m 37s
    1. If
      2m 22s
    2. Time
      4m 16s
    3. Date and time
      2m 14s
    4. Lookup
      4m 45s
  17. 6m 55s
    1. Compare text
      3m 27s
    2. Concatenation
      1m 47s
    3. Special characters
      1m 41s
  18. 6m 10s
    1. Pivot tables
      6m 10s
  19. 16m 0s
    1. Recording a macro
      8m 43s
    2. Macro menus
      3m 45s
    3. Global macros
      3m 32s
  20. 11s
    1. Goodbye
      11s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Excel 2003 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.