tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
Ok so i have a problem, not got a clue how i can fix this so please help if you can
I download dates from a csv file,
Each Line has an ID, start date, and end date,
Now the problem I have is our systems are very old and quite a lot we get mutlpile lines for the same dates,
So for example I might get one which is for ID "7", 23 December 2019 to 3 January 2020
and another line for ID "7", 25 December2019 to 26 December 2019 but if I record the first dates then i get a doubling up of the second dates. so I need to remove the second dates.
So what i need a very clever macro that when run looks at the Info and does this
Column B is ID
Column D start date
Column E end date
for every row, if the ID is the same as this row then if the dates are with the dates of that row delete this row? (or something like this)
P.s there is space in L & M for any help rows that might be needed.
Ok so i have a problem, not got a clue how i can fix this so please help if you can
I download dates from a csv file,
Each Line has an ID, start date, and end date,
Now the problem I have is our systems are very old and quite a lot we get mutlpile lines for the same dates,
So for example I might get one which is for ID "7", 23 December 2019 to 3 January 2020
and another line for ID "7", 25 December2019 to 26 December 2019 but if I record the first dates then i get a doubling up of the second dates. so I need to remove the second dates.
So what i need a very clever macro that when run looks at the Info and does this
Column B is ID
Column D start date
Column E end date
for every row, if the ID is the same as this row then if the dates are with the dates of that row delete this row? (or something like this)
P.s there is space in L & M for any help rows that might be needed.
ID | Start Date | End Date | what to do | |||||||||
7 | 1 jan 2020 | 10 jan 2020 | Keep this row! | |||||||||
6 | 7 jan 2020 | 9 jan 2020 | Keep this row! | |||||||||
7 | 4 jan 2020 | 7 jan 2020 |
| because this row has dates that are already withing dates in another row I dont need it! | ||||||||
7 | 1 feb 2020 | 5 feb 2020 | Keep this row! | |||||||||
5 | 3 march 2020 | 5 march 2020 | Keep this row! | |||||||||
7 | 1 march 2020 | 5 march 2020 | Keep this row! | |||||||||
6 | 9 Jan 2020 | 9 jan 2020 | ||||||||||