date formatting
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Date formatting

Date formatting

resolvedResolved · Low Priority · Version 2003

replyReply Tue 16 Sep 2008, 16:42Delegate Ross said...

Ross has attended:
Excel Intermediate course

Date formatting

How to creat a formula for yesterdays date that is a day during the week i.e. If Monday then the date must be the Friday before. If tues then the date must be Monday.

For upcoming training course dates see: Pricing & availability

replyReply Wed 17 Sep 2008, 15:00 Edited on Wed 17 Sep 2008, 15:02Trainer Laura said...

RE: Date formatting

Hi Ross

Thank you for your question.
The answer requires the use of the IF function and Weekday function. Weekday function returns 1-7 when given a date. So given that Monday returns 2 you can use the following:

=IF(WEEKDAY(C4)=2,C4-3,C4-1)

This formula assumes that the date is in C4, and that the dates will only be Monday to Friday dates.

If you are looking at more complex functions then perhaps you should consider the Excel Advanced course.

Let me know if you need further help.

Laura GB

 

Please browse our web site to find out more about
introduction excel training and other Microsoft training courses.

Excel tip:

Validating text entries

1. Select the range of cells.
2. From the Data menu, select Validation.
3. Select the Settings tab.
4. From the Allow dropdown list, select Custom.
5. In the Formula box, enter the following formula:
=IsText (A1)
where A1 is the first cell in the range.
6. Click OK.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard