What is the easiest way to convert quarter notation "yyyyq1"- "yyyyq4" into proper Excel dates? We can assume e.g. that 1999q2 means 1st April 1999.

link|improve this question

feedback

2 Answers

up vote 5 down vote accepted

Perhaps simplify the month part.....

=DATE(LEFT(A1,4),RIGHT(A1)*3-2,1)
link|improve this answer
feedback

You can use the formula:

=DATE(LEFT(A1,4), IF(RIGHT(A1,1)=1,1,IF(RIGHT(A1,1)=2,3,IF(RIGHT(A1,1)=3,6,IF(RIGHT(A1,1)=4,9,99)))), 1)

The first part LEFT(A1,4) extracts the year. The second one maps the last digit in the string (RIGHT(A1,1)) to the month: 1=Jan, 3=Mar, 6=Jun, 9=Sep). Finally, the last argument is always 1, first day of the month.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.