sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I think this will be a tough one to solve, but maybe one of you guys can prove me wrong!
I need code to sort duplicate data when a button is pressed as follows;
For exmaple, Sheet 1 has columns A, B and C which contains Date, Name and Time. The info is entered by way of a userform but I need a way of picking up the fact that the Name has appeared twice and then 3 times if necessary.
I want the code to copy the data, paste the values to Sheet 2 which will show columns A, B, C, D, and E and show the data as Date 1, Date 2, Name, Time 1 and Time 2 so that a single row of data shows the fact that the name has appeared twice and on what dates and times.
If that's not enough, I then want the code to clear the cells on Sheet 1 that it has just copied, effectively removing the duplicates from Sheet 1 which are now recorded on Sheet 2.
I need it to work this way because Sheet 2 is then used to Mail Merge in Word and if the data is not correct then it won't work.
Is it possible?
I need code to sort duplicate data when a button is pressed as follows;
For exmaple, Sheet 1 has columns A, B and C which contains Date, Name and Time. The info is entered by way of a userform but I need a way of picking up the fact that the Name has appeared twice and then 3 times if necessary.
I want the code to copy the data, paste the values to Sheet 2 which will show columns A, B, C, D, and E and show the data as Date 1, Date 2, Name, Time 1 and Time 2 so that a single row of data shows the fact that the name has appeared twice and on what dates and times.
If that's not enough, I then want the code to clear the cells on Sheet 1 that it has just copied, effectively removing the duplicates from Sheet 1 which are now recorded on Sheet 2.
I need it to work this way because Sheet 2 is then used to Mail Merge in Word and if the data is not correct then it won't work.
Is it possible?