using dates if statement

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

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

Using dates in an IF statement

resolvedResolved · Medium Priority · Version 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.

 

Training courses

 

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Adding Rows or Columns in an Excel 2010 Worksheet

If you want to add a row to an Excel spreadsheet, these are the simple steps you should take:

With your mouse, right click on the row header below where you want the new row to be added. Then, click Insert.

Follow exactly the same steps if you want to add a column to an Excel worksheet, right click on the column header, choose Insert and the new column will be inserted to the left of the selected column.

View all Excel hints and tips


Server loaded in 0.08 secs.