Microsoft Office Tutorials and References
In Depth Information
Using Other Functions
Using Date and Time Functions
The Date and Time functions help you display
dates or times in the worksheet without actually
entering them. For example, there are functions
for entering the current date or the current date
and time. There are other functions you can use
to add or subtract dates—for example, you might
want to subtract the start date of a job from its
end date in order to calculate how long the job
took. Only work on weekdays? No problem;
there’s a date function that counts the number
of weekdays only between two dates.
You want to display the date at the top of the
worksheet, but you also want to make it clear
what that date means by preceding it with the
text, “Updated on”. As you can see in the
worksheet shown in Figure 3-18, the formula you need
is =“Updated on ” &TEXT(TODAY(),“m/d/yy”).
The TODAY function, which is described in the
section “Using Date and Time Functions,” is a
simple function that displays today’s date. The
date is updated every time the worksheet is
recalculated. So if you open the workbook at
some later date, this date is automatically
changed to reflect the current date. If today’s
date was already displayed elsewhere in the
worksheet, you could simply reference that cell
in the formula like this: =“Updated on ”
Dates Are Stored As Numbers
Excel stores all dates as numbers so that
you can perform date calculations, such as
subtracting one date from another. The date,
January 1, 1900, is equal to 1, whereas June
3, 2001, is equal to 37,045. Subtract the two
and you get 37,044 days.
The TODAY function does not have any
arguments. You simply type =TODAY() into a cell,
press Enter, and the current date appears. You
can then apply any date format you want to
display the date the way you like. Every time
the worksheet is recalculated, TODAY updates the
date in the cell automatically.
Figure 3-18
Use TEXT to change a number into text.
The VALUE function is the opposite of TEXT,
converting a text string that looks like a number
into an actual value that can be calculated just
like any other number. The syntax is
Search JabSto ::

Custom Search