Office 2007 - Excel

Lesson 70: Dates and Time (cont…)

70/83 Lessons 

Date Functions

The first feature that I’m going to discuss here is the “NETWORKDAYS” function.
This function does exactly what it says.
It calculates the number of working days between two dates.


We always start a function with the equal sign (=).
We type NETWORKDAYS (
The first argument that we must enter is the start date, in this case A1
We type “,” and the second argument which is the final date, A2.
We type a “,” again.
The third argument is the holidays, this is optional.

It is impossible for Excel to know when you are on leave or when there are public holidays, so place these in a list, and use this list, or better the range of this list, for the third argument.
Click Enter on your keyboard, and Excel calculates the number of working days.

The second example is the function “DATEDIF”.
This function calculates the difference between two dates.
For example, I want to know how many days old I am.
I type the equal sign, and type DATEDIF, in uppercase or lowercase letters, that doesn’t matter.
I open the brackets, and I type in my date of birth as the first argument, in cell A1.
I type today’s date as the second argument, in cell A2.
The third argument I specify the format in which I want to show the result. Y years, M for months, and D for days. Place this last argument in quotation marks.

In my case I want to know the number of days, so I type “D”, and click Enter.
Wow, I’m over 18 thousand day old.

Adding hours

If we want to add time in Excel, we need to format the cell.
Right click the cell where you have entered the sum formula.
Select “Format Cells” from the drop-down menu.
Choose the “Numbers” tab and click “Custom” in the Category list.
Select [h]: mm: ss from the list of the different types.
Click OK.


This gives a correct representation of the sum of the time.
If you want to remove the seconds from the display of the sum, you can remove “:ss” from the “Type” box.

Display current date and time

We can insert current date in various ways in Excel.
The quickest way is to click on the “Ctrl+:” keys on your keyboard.
This gives today’s date, this date will not be modified when we reopen the file tomorrow.

A second way is by making use of the “TODAY” function.

Type = TODAY () in a cell. This gives today’s date. And tomorrow it will automatically display the date of tomorrow. The difference lies in the formula bar:

type Ctrl :
then it returns the current date in the formula bar as a date.
Type the function TODAY
This remains the position today, but tomorrow.

 

A third way is the “NOW” function.
Type = NOW () it returns the current date, plus the hour. Because we are dealing with a function, it will also be automatically adjusted.

The quickest way to add a time in a cell, is to click on the “Ctrl + Shift + ;” buttons on your keyboard.

Awesome!
You've completed Lesson 70
START NEXT LESSON