I have an Excel file that contains around 200 000 rows of customer data. One of parameters is customer ID. This file is used to periodically send products to all customers. Naturally errors occur when mailing these products, so the mailing service provides us with customer ID's written on the products that were damaged or could not be mailed for some reason. I'm looking for a fastest way to select, copy and delete the rows with these ID's from the original file. For instance, the mailing service returns us an Excel file that contains only Customer ID's of the faulty products. I have to find all of the rows containing this ID, copy them into a new file and delete them from the original file. This was done manually so far, but that takes too much time. My question is - is there a way to load a list of ID's and have the Excel to select the rows containing them, or at least to sort the sheet so that the rows with those ID's are on top? Any suggestion is welcome. Thank you
Asked
Active
Viewed 1,202 times
1
-
Yes there is a way to compare two different files and perform operations or otherwise manipulate the file(s) based on some criteria that you define. I would use VBA/macros to accomplish this. [What have you tried so far?](http://whathaveyoutried.com) – David Zemens Mar 19 '13 at 15:15
-
I would do the following: loop through your CustomerID which failed, match them to the CustomerID value in the main file, copy them into the new file & delete the old entry. Should be quite easy to do tbh. – CustomX Mar 19 '13 at 15:32
-
I don't have any experience with either VBA or macros, so I was just asking to see if there is an alternative. I'll try to find some tutorials that might help me solve this problem. Thanks. – NDraskovic Mar 19 '13 at 15:42
1 Answers
0
I managed to solve this problem by using VLOOKUP function to copy the necessary data into a new sheet - that solves the problem of extracting the customers whose shipments need to be repeated. I solved the deleting part outside of Excel (I created an application that does that).

NDraskovic
- 706
- 2
- 22
- 50