Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

articleUsing Dates Within Excel

Dates can be daunting for the beginner within Excel, particularly as Excel stores dates as decimal numbers and not actual dates. This is due to the fact that many people need to use date cells within formulas. A simple example would be a worksheet where there are two columns, one as a start date of a project and the next as an end date. If someone needed to calculate the length of a project then they could use a formula to easily find the total project time. Excel stores dates as numbers so these calculations can be performed. This does mean that you will need to consider date formats when using dates within your worksheet. If you accidentally format the column as number type then all your dates will appear as meaningless numbers!

There are many different ways to format dates and many formulas that can be performed upon them. There are some simple functions you can use to get started. Open Excel and type the following into the first cell (A1) and then click on a different cell or press the enter key:

=NOW()

Excel will automatically add the current date and time in the cell and format this cell as a date, but it may not be the format you would like. Right click on the cell and choose 'Format Cells.' In the first tab you will see that you can select 'date' as the format type and select a format from the list. You can also choose 'Custom' and set your own format type such as:

dd/mm/yyyy hh:mm

You can format any date cell in this way and it is advisable to do so in order to keep the format consistent throughout the worksheet. It can look very unprofessional and confusing if there are several date formats in one sheet. You can format an entire column in a particular date format by right clicking on the column header and formatting as shown above. Experiment with different date formats and consider your target audience. Different locations across the globe use different date formats. It is best to find out what format they use and customise it for them to avoid confusion.

Once you have mastered the formatting of the date cell, it is useful to attempt some simple formulas. In the cell B1 type 01/01/2009 and in the cell underneath B2 type 01/02/2009. In cell C1 type the following formula and press the enter key:

=SUM(B2-B1)

The result of this formula should appear as '31/01/1900.' This is clearly not what we are aiming for! This is because the cell where the formula is typed will automatically be set as date since you are subtracting two date cells. Format the result cell as a number and the result should appear as 31. We can tell there are 31 days between the two dates. This is a very simplified example and in most professional worksheets, you will not perform calculations on dates in this way. Instead it is more likely that you will use the DATEDIF function. This function allows you to perform the calculation, but can give you the result in the time interval you specify such as months, years or days. Delete the above formula in cell C1 and type the following:

=DATEDIF(B1, B2, "d")

When you press the enter key, you will notice that the result is the same. It is basically telling Excel to perform the same calculation. Now change the formula to the following:

=DATEDIF(B1, B2, "y")

You will notice that the formula result is now zero as we have asked Excel to calculate the number of years between the two dates by entering "y" as the interval. It may be that you will need to calculate the difference between today's date and a large number of dates given in a column. It would be possible to use the above formula, but it will be necessary to add a column called today's date which will repeat over and over and will need to be continuously updated. Instead, you can use the =NOW() function given above in one cell which will refresh when the workbook is opened. You can then add a Datedif formula using an absolute reference to this cell. An absolute reference means a cell in a formula that will never change. When you drag a formula to other cells, Excel will automatically update the formula to be appropriate for the row and cell change. An absolute reference tells Excel to use the same cell and not automatically update the formula. The following is an example of the formula you may use:

=DATEDIF(B1, $A$1, "d")

In this formula the cell A1 contains the =NOW() formula i.e. the current date. B1 is the date I want to calculate from. I am requesting how many days between a date in the past to the current date. The dollar signs creates the absolute reference. If I drag the formula down in a column, B1 will be incremented for each row but the current date cell will remain the same. In this way I can use the same formula for many rows of data.

The simple examples shown above are meant only as a taster to the magical world of Excel date formulas! Worksheets containing date information are extremely common and it is vital that you understand formatting and some formulas in order to make sense of the data. If you use Excel regularly it would be worth investing in a course to cover these topics and others in more depth. You can never know too much about excel and it has infinite uses in the workplace. You don't need to know everything, you just need to know more that the person sitting at the desk next to you so get involved!

Author is a freelance copywriter. For more information on excel microsoft training, please visit http://www.microsofttraining.net


Original article appears here:
http://www.microsofttraining.net/article-749-using-dates-within-excel.html


Back to article list

Distribution notes

PUBLICATION GUIDELINES

  • You have permission to publish this article for free providing the "About the Author" box is included in its entirety.
  • Do not post/reprint this article in any site or publication that contains hate, violence, porn, warez, or supports illegal activity.
  • Do not use this article in violation of the US CAN-SPAM Act. If sent by email, this article must be delivered to opt-in subscribers only.
  • If you publish this article in a format that supports linking, please ensure that all URLs and email addresses are active links, without the rel='nofollow' tag.
  • Software Training London Ltd. owns this article. Please respect the author's copyright and above publication guidelines.
  • If you do not agree to these terms, please do not use this article.

Rate this page:
2.8/5 (129 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training