Hi,
Here's what I'd do as starters. Would you do this manually with a larger set of your data so that we can prove the concept. If this results in a simple table of document records then we can write a macro to do it automatically, and then if you can provide the statement template that you want to fill for each customer, and the customer name/address record database, we can put the two together.
Starting with your Statement data report add a single new blank row 1.
Now add two new blank columns A & B
Now in A2 enter the formula
and in B2 enter
Copy A2:B2 down your whole set of data.
Now filter the whole sheet for the word '"Keep" in column B. This should result in a simple list of all transaction records and in column A the Customer number.
Presumably the report has a grand total in the 'Amount in DC.' column. Make a note of this and with the data still filtered put an where nn is the last numbered row. Check that this subtotal of the filtered rows agrees with the report total.
Assuming that's the case then the next step in the automated process will be to filter column B for all the 'Delete' rows, select them and delete them
But one step at a time.
Bookmarks