# Creating Date Range in Excel for Quarterly Reporting

I'm trying to get a report to run based on Quarters.  I need the Quarter date to display based on a date in another cell.  I Currently have:

=IF(ROUNDUP(MONTH(D2)/3,0)=1,"01/01/11..03/31/11",IF(ROUNDUP(MONTH(D2)/3,0)=2,"04/01/11..06/30/11",IF(ROUNDUP(MONTH(D2)/3,0)=3,"07/01/11..09/30/11","10/01/10..12/31/11")))

However, I have to go in each year to change the year.  I would like the year to change automatically.
I need the result to display as: 1/1/2011..3/31/2011 (which would change according to the quarter)
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
You can change your formula to this:

=IF(ROUNDUP(MONTH(D2)/3,0)=1,"01/01/" & RIGHT(YEAR(D2),2)&"..03/31/"& RIGHT(YEAR(D2),2),IF(ROUNDUP(MONTH(D2)/3,0)=2,"04/01/"&RIGHT(YEAR(D2),2)&"..06/30/"& RIGHT(YEAR(D2),2),IF(ROUNDUP(MONTH(D2)/3,0)=3,"07/01/"&RIGHT(YEAR(D2),2)&"..09/30/"&RIGHT(YEAR(D2),2),"10/01/"&RIGHT(YEAR(D2),2)&"..12/31/"&RIGHT(YEAR(D2),2))))

jppinto
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
Working example attached...
Book4.xls
0
Author Commented:
Thank you!
0
Commented:
This one is a bit shorter :)

=TEXT(DATE(YEAR(D2),CHOOSE(MONTH(D2),1,1,1,4,4,4,7,7,7,10,10,10),1),"mm/dd/yy")&".."&TEXT(DATE(YEAR(D2),CHOOSE(MONTH(D2),1,1,1,4,4,4,7,7,7,10,10,10)+3,0),"mm/dd/yy")
0
Commented:
:) good work matthew...
0
Commented:
Shorter still:

=TEXT(DATE(YEAR(D5),3*ROUNDUP(MONTH(D5)/3,0)-2,1),"mm/dd/yy")&".."&TEXT(DATE(YEAR(D5),3*ROUNDUP(MONTH(D5)/3,0)+1,0),"mm/dd/yy")
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.