Automatic date spans in Excel

I am in need of a formula that if the current date is between the 1st and 15th of the month the date span will be the 16th through the end of the previous month.  If the current date is between the 16th and the end of the month, then the date span will be the 1st to the 15th of the current month.

Thank you in advance for any help.
Who is Participating?
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.

Can you explain what you mean by "date span"?  Normally cells only show individual values.  Are you looking for all dates in adjacent cells?
For example, if A1 = 2/1/2013, then A2=1/16, A3=1/17, A4=1/18, etc?
jmkbrownAuthor Commented:
Sorry for example
A1 = 09/19/2013 then
A2 = 09/01/2013
A3 = 09/15/2013
barry houdiniCommented:
How do you want to return the "date span"? As a text value you can try this

=IF(DAY(TODAY())<16,"16-"&TEXT(EOMONTH(TODAY(),-1),"d mmm yyyy"),"1-15 "&TEXT(EOMONTH(TODAY(),-1)+1,"mmm yyyy"))

Today that will give you this:

1 - 15 Sep 2013

but on 1st October you'll get

16 - 30 Sep 2013

regards, barry
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.


pls try =IF(DAY(E5)<=15,EOMONTH(E5,-2)+16,EOMONTH(E5,-1)+1)




Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
This formula can give you the 1st of the current month or 16th of the previous month for any given date:

=IF(DAY(A1)<16, DATE(YEAR(A1-15),MONTH(A1-15),16),DATE(YEAR(A1),MONTH(A1),1))
barry houdiniCommented:
Sorry, I thought you wanted text.....if you have today's date in A1 try this:

In A2.....


and this one in A3


regards, barry
Rob HensonFinance AnalystCommented:
Start date:


Finish Date:


In xl03 EOMONTH needs AnalysisToolpak AddIn enabled.

Rob H
jmkbrownAuthor Commented:
Thank you very much!  This worked perfectly!
barry houdiniCommented:

If DAY(E5)<=15 that will give you the day before the end of the month, the -1 after the first EOMONTH isn't required, should be:


regards, barry
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.