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