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

using dates if statement

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Using dates in an IF statement

Using dates in an IF statement

ResolvedVersion 2003

Charles has attended:
Excel Advanced course

Using dates in an IF statement

Please can you tell me how to incorporate dates into an IF statement.

For example if you have a list of several hundred start dates of employees, ranging over several years, but all in a single column, and you want to write an IF statement that returns the quarter (e.g. 1st, 2nd, 3rd, 4th) in which each employee joined (irrespective of the year) in the next column. Given that the dates are in the format 10/04/2006, 09/08/2008 etc...

How would you write that in an IF statement? Can it be done? If not is there another way it could be done?

Many thanks in advance!

RE: Using dates in an IF statement

Hi Charles,

Thank you for your question and sorry about the delay in responding.

Try the following function:

=CHOOSE(MATCH(MONTH(A1),{1,4,7,10}),"Quarter1","Quarter2","Quarter3","Quarter4")

It chooses the month and matches it in the{1,4,7,10} part of the formula.

As the month is greater than 4 but less than 7, it places the second answer which is Quarter 2.

I hope this helps and makes sense.

Regards

Simon

RE: Using dates in an IF statement

Many thanks Simon. That is really useful.

Excel tip:

Shared Conditional Formatting

In a shared workbook, conditional formats applied before the workbook was shared will continue to work; however you cannot modify the existing conditional formats or apply new ones.

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.