Breaking down some dates using a formula

zelarra

Board Regular
Joined
Jan 2, 2021
Messages
70
Office Version
  1. 365
Platform
  1. Windows
Hi, guys.

I need to extract the intermediate dates by rows from a list of dates. Here are two examples:

EXAMPLE 1

14-5-21 Start
18-6-21 End
23-5-22 Start
3-2-23 End

14-5-21 Start
18-6-21 End
23-5-22 Start
31-12-22 Intermediate step 1
1-1-23 Intermediate step 2
3-2-23 End

In this example, I have a list of dates for two couples. I need to break down by year when the year of the start date does not match the year of the end date, as I indicate in the second list, which means that I go from a list of 4 rows to one of six.

EXAMPLE 2

14-5-20 Start
18-6-20 End
23-5-21 Start
3-2-24 End

14-5-20 Start
18-6-20 End
23-5-21 Start
31-12-21 Intermediate step 1
1-1-22 Start Intermediate step 2
31-12-22 Intermediate step 3
1-1-23 Intermediate step 4
31-12-23 Intermediate step 5
1-1-24 Intermediate step 6
3-2-24 End

In this example, similar to the previous one, I have put more than a year of difference between the start date and the end date, so that I should get 6 intermediate steps.

It is important that the date and a column with the texts start, intermediate step and end appear.

Thank you very much.

 

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.
Hello, @Cubist

I need to update the UDF.

It works perfectly for breaking down the dates. Now I need to add a third column with the criteria.

Let me explain:

As you can see in this image, in column E I put the type of movement: either a percentage or I choose suspension of the pension.

1719747965642.png


It is this type of movement that I want to appear here:

1719747981205.png


The column I crossed out is because I was testing and two came up, and I only want one with the type of movement.

Thank you very much.
 
Upvote 0
That changes the code a lot. Please start a new thread.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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