![]() In any case, for my data, Everyone gets a unique id unless they are a duplicate, where they get the original first instance of the duplicate values id. Only question is how will it fare over 20k rows and your 8GB ram? The code seems to be exactly what you want. But I think now im going around in circles and this is what excel was built for. Instead what I'm doing (due to time constraints I had) - is looking them up with an index match WorksheetFunction. I say "used a trick", because I think I should have stored the duplicates and their Id's in their own array, which is what I think you "should" do for a proper working answer and run check against them and assign the relevant values that way. 'delete "Duplicate - " & in your case if you chose to do with it. ![]() ![]() ![]() ![]() MatchFoundIndex = WorksheetFunction.Match(Cells(iCntr, 2), Range("B1:B" & lastRow), 0)Ĭells(iCntr, 1) = "Duplicate - " & WorksheetFunction.Index(Range("A1:A65000"), WorksheetFunction.Match(Cells(iCntr, 2).Value, Range("B1:B65000"), 0)) LastRow = Range("B65001").End(xlUp).Row 'changed it to +1 of the lookup range to catch all values. It also, and also used a 'trick', but i think this is what you want. I've done it quick, adapted the code i found here and had to think about ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |