It doesn't look like it's tripping up on the "XXX."

When the macro runs down column A it snags on A16 and again on A53

Make column A some color other than white and you'll see what I mean. The formula in A16 snags on the "Note for accounting." As for A53, I bet someone accidentally hit the space bar with E53 selected and broke that formula too.

Delete A16 which as far as I can tell will never need to have contents, and replace E53 with =SUM(E54:E54) to restore it. Data validation would have been very useful in this spreadsheet.