Hi Howardc1001,
Try below code ... You can add more words in the "a" Array which should be easier to maintain than changing the code itself.
Also, if my understanding is correct, you want only those items where the net is = to zero to be deleted. i.e. if the sum of all items containing the word "Stationery" is equal to zero then all rows to be deleted otherwise don't delete. Based on your sample file, just change the amount from debit to credit for reference # 9683263 & the balance for that row becomes -30 then none of the "Stationery" rows should be deleted. This is what my code does which is unlink the behavior of the code supplied by jolivanes. Not sure which one you're looking for ...
Bookmarks