Rows insert for the period of given dates

jassi2006

New Member
Joined
May 3, 2020
Messages
22
Office Version
  1. 2019
  2. 2016
  3. 2007
Platform
  1. Windows
  2. Mobile
  3. Web
Hello Excel Warriors

I am working and trying but failed to achieve the goal.

I want to create an VBA program to create Excel sheet to calculate arrear of pay.

I just want to create list of months automatically between start and end dates in which if the starting date or the end date have only dates then it comes as date from to. Here is the example
If given date is 12-03-2020 to 25-06-2020

Then the result is
12-03-2020 to 31-03-2020
04-2020
05-2020
01-06-2020 to 25-06-2020

OR it will also be ok
12-03-2020 to 31-03-2020
01-04-2020 to 30-04-2020
01-05-2020 to 31-05-2020
01-06-2020 to 25-06-2020

Please help !!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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
Back
Top