Hi,
Just in case someone is interested I've found a kind of solution.
What this macro does is the following: creates 2 additional columns D and E. In column D I'm adding the invoice number to supplier name. In column E I'm entering SUMIF formula to add up the amounts in column C for which the supplier+invoice number is the same. Than it filters for the lines where this sum is zero. And deletes those lines. At the end it just displays a message that macro has been completed.
I accept, this does not look very professional. But it is at least something. If anyone can help me improve it, will be much appreciated.
Namely:
1. I'm not very happy that after filtering for zero values macro selects the filtered records starting with E2. Is there a way to indicate that the selection should start from the first record with zero value? For instance in this particular case the first zero value was in E2 cell. What if that would be E4 in another case?
2. How do I extend the formulas entered in D2 and E2 to the last row of the table?
3. How do I include an information about the number of deleted records into the message box?
Thanks in advance for any feedback.
Eduard
Bookmarks