Hi,
Wondering if any one can help. I have been searching online for quite sometime but can't seem to find a solution to what I'm looking for.
Apologies for the long description but I hope it will reduce the amount of Q&A.
I have written a macro to get me to a point with my raw data whereby I have identified the number of instances that it appears using a concatentation of 3 columns and have seperated these from the unique instances.
What I would like to do with the data now, and where I'm having a problem, is to remove duplicates and lower values based on additional columns.
Column A represents columns B, C & D concatenated and by which I have determined the duplicates thus far. What I now need to do is remove duplicates based on column A and on columns E and F and also remove rows whereby column A is duplicated but the value in column E is lower. To add to the complexity, for a particular duplicate in column A, if one of the values in column E is text eg Other or NA, then I need to leave and NOT remove all instances of column A.
To Summarise:
1. Remove Duplicates whereby Columns A, E and F match and column E does not contain text
2. Remove Rows whereby Column A and F match and where column E is not the highest value and that none of the values in E for duplicates of A are text
3. All rows removed to be copied to a worksheet called "Removed"
I have attached an example spreadsheet, however the data I work with will vary in length, usually 40k-150k lines, and usually have additional columns although the additional columns would be irrelevant.
In this small example based on the rules above rows 5, 11, 17, 20, 23, 24 & 25 would be moved to the "Removed" worksheet and the others would remain.
Any help would be grealty appreciated because I have been trying to do this for over a week and being fairly new to VBA it is doing my head in.
Thank you in advance
Rich.
PS Using excel 2007
Bookmarks