98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Using dates in an IF statement
Using dates in an IF statement
Resolved · 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
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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Adding Rows or Columns in an Excel 2010 WorksheetIf you want to add a row to an Excel spreadsheet, these are the simple steps you should take: |