Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

date formatting

ResolvedVersion 2003

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.

Edited on Wed 17 Sep 2008, 15:02

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

Excel tip:

Do a fast scroll

In big Excel databases with many records, you can move down thousands of rows super-fast as follows: hold down Shift then click on the scrollbar somewhere below the scrollbar handle. This will move you way down the sheet without your having to use the scrollbar up/down arrows or drag on the scrollbar handle.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.