Date function -

tommacca

New Member
Joined
Aug 6, 2014
Messages
41
Hi guys,

I am trying to create either a macro or formula that will do the following;

reference the date in A2 and a3

Output the start date to the last day of the month but the date range could be 3 months so it would need to the output the date of the 1st to the last day of each month or the end date if thats before the end of the month
ie a2 = 01/01/14
a3 = 08/ 03/2014

so it would output (each date in separate cell)

01/01/2014 - 31/01/2014
01/02/2014 - 28/02/2014
01/03/2014 - 07/03/2014
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,498
Office Version
  1. 365
Platform
  1. Windows
Here is one option:

Excel Workbook
ABCD
201/01/201401/01/201431/01/2014
308/04/201401/02/201428/02/2014
401/03/201431/03/2014
501/04/201407/04/2014
Sheet1
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
48,536
Office Version
  1. 365
Platform
  1. Windows
I have C2 as a stand-alone formula and C3 and D2 copied down.

Excel Workbook
ABCD
1StartEnd
25/01/145/01/1431/01/14
38/04/141/02/1428/02/14
41/03/1431/03/14
51/04/147/04/14
6
7
Dates
 

Watch MrExcel Video

Forum statistics

Threads
1,129,804
Messages
5,638,464
Members
417,025
Latest member
MusterDuster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top