Link to home
Start Free TrialLog in
Avatar of SunnyX
SunnyX

asked on

VBA Excel: removing duplication in database

Let say there is database in the sheet from row A to row F with some lines that are duplicated. I need to write VBA macros that removes these duplication in data.


Before applying macros :
54.46      54.46      54.46      54.46      1137      5/29/2015 9:30
54.42      54.49      54.38      54.48      196268      5/29/2015 9:31
54.44      54.45      54.39      54.43      29330      5/29/2015 9:32
54.4      54.47      54.38      54.44      30679      5/29/2015 9:33
54.415      54.42      54.36      54.38      25518      5/29/2015 9:34
54.38      54.415      54.34      54.41      39001      5/29/2015 9:35
54.32      54.38      54.3      54.37      54390      5/29/2015 9:36
54.33      54.37      54.32      54.32      29377      5/29/2015 9:37
54.355      54.369      54.32      54.3399      45962      5/29/2015 9:38
54.35      54.37      54.34      54.36      47212      5/29/2015 9:39
54.35      54.37      54.33      54.35      42659      5/29/2015 9:40
54.35      54.365      54.3348      54.35      28713      5/29/2015 9:41

54.33      54.37      54.32      54.32      29377      5/29/2015 9:37
54.355      54.369      54.32      54.3399      45962      5/29/2015 9:38
54.35      54.37      54.34      54.36      47212      5/29/2015 9:39
54.35      54.37      54.33      54.35      42659      5/29/2015 9:40
54.35      54.365      54.3348      54.35      28713      5/29/2015 9:41

54.34      54.38      54.34      54.355      66511      5/29/2015 9:42
54.32      54.37      54.32      54.34      33942      5/29/2015 9:43
54.35      54.355      54.31      54.329      31816      5/29/2015 9:44


After applying macros :

54.46      54.46      54.46      54.46      1137      5/29/2015 9:30
54.42      54.49      54.38      54.48      196268      5/29/2015 9:31
54.44      54.45      54.39      54.43      29330      5/29/2015 9:32
54.4      54.47      54.38      54.44      30679      5/29/2015 9:33
54.415      54.42      54.36      54.38      25518      5/29/2015 9:34
54.38      54.415      54.34      54.41      39001      5/29/2015 9:35
54.32      54.38      54.3      54.37      54390      5/29/2015 9:36
54.33      54.37      54.32      54.32      29377      5/29/2015 9:37
54.355      54.369      54.32      54.3399      45962      5/29/2015 9:38
54.35      54.37      54.34      54.36      47212      5/29/2015 9:39
54.35      54.37      54.33      54.35      42659      5/29/2015 9:40
54.35      54.365      54.3348      54.35      28713      5/29/2015 9:41

54.34      54.38      54.34      54.355      66511      5/29/2015 9:42
54.32      54.37      54.32      54.34      33942      5/29/2015 9:43
54.35      54.355      54.31      54.329      31816      5/29/2015 9:44


Many thanks in advance !
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SunnyX
SunnyX

ASKER

Many thx for your help
You're welcome Sunny, and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
Avatar of SunnyX

ASKER

Because this question is is very closely based on what I suggested in https://www.experts-exchange.com/questions/28691096/VBA-Excel-merging-two-txt-files.html, which is still open and in progress, this question can be considered as a duplicate question. The other question contains important details. Duplicate questions are an issue - against the Terms of Use is one of the reasons.
@Qlemo
With all respect, This question is not similar to the other question that you referring to. Yes indeed, this question and the other one have same example but the this question asking about removing duplication and another one asking about merging two files which could be considered like 4 steps action uploading , removing duplication and sorting and important data.
The reason why I open this question was that I didn't receive answer on this 4 steps action that why I decide to divide question on four parts. Now tell me what I should do  in case if I still wanna receive answer on my the other question.
https://www.experts-exchange.com/questions/28691096/VBA-Excel-merging-two-txt-files.html 
Once again, answering on this question fulfill only one fourth what Im trying to accomplish.
Your isolated parts are contradicting, and obfuscating the final target. In particular this question's solution uses a sort on the first value, but that violates your "don't change the sequence" condition you stated in the other question. Though, as the question is asked, the solution is valid, so no failure on Martin's side. But I'm convinced it is not useful for you, because you omit the bigger picture.