Thanks for the reply and your help

The rows containing a trailing X in Col B and where the value in Col D based in the account number ending in an X is not being deleted.

I have attached a sample file with very little data to show you what I want to achieve , indicating which rows to be deleted i.e trailing X + where the value containing the trailing X is zero.

Kindly amend your code accordingly