kevdragon1
New Member
- Joined
- Mar 8, 2021
- Messages
- 21
- Office Version
- 365
- Platform
- Windows
Hi,
I have a data set made of 2 columns for each office.
Column A has the Payments.
Column B has the Date of the payments (1st of the month).
My goal is to have a summary (dates between which the payments will be made).
Here is an example :
The result I would expect is in an excel format :
The dates are always from small (earliest) to big (latest). The dates do not get duplicated.
The problem is the payments. In 90% of the case, the offices have bigger payments and the payments don't repeat.
My problem is that sometimes the payments will go (as shown above) like this: 1000$ for month 1, 2000$ for month 2 and 3, and then back down to 1000$ for month 4.
I tried coding a Macro with the UNIQUE formula for the payments and then using MIN and MAX to find the dates for each payment. That worked great until I realized that sometimes a payment will get repeated down the road...
Is there a formula that can help me? I think what needs to happen is for the Macro to understand that it needs to check each repeating payment row and return the dates and then do that for the whole column. But I have no idea how to do that.
I have a data set made of 2 columns for each office.
Column A has the Payments.
Column B has the Date of the payments (1st of the month).
My goal is to have a summary (dates between which the payments will be made).
Here is an example :
Payment | Date |
1000 | Dec 2020 |
1000 | Jan 2021 |
1500 | Feb 2021 |
1700 | Mar 2021 |
1700 | April 2021 |
1000 | May 2021 |
1000 | June 2021 |
0 | July 2021 |
The result I would expect is in an excel format :
Payment | Start | End |
1000 | Dec 2020 | Jan 2021 |
1500 | Feb 2021 | Feb 2021 |
1700 | Mar 2021 | April 2021 |
1000 | May 2021 | June 2021 |
0 | July 2021 | July 2021 |
The dates are always from small (earliest) to big (latest). The dates do not get duplicated.
The problem is the payments. In 90% of the case, the offices have bigger payments and the payments don't repeat.
My problem is that sometimes the payments will go (as shown above) like this: 1000$ for month 1, 2000$ for month 2 and 3, and then back down to 1000$ for month 4.
I tried coding a Macro with the UNIQUE formula for the payments and then using MIN and MAX to find the dates for each payment. That worked great until I realized that sometimes a payment will get repeated down the road...
Is there a formula that can help me? I think what needs to happen is for the Macro to understand that it needs to check each repeating payment row and return the dates and then do that for the whole column. But I have no idea how to do that.