Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Perhaps simplify the month part.....

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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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