.SpecialCells will error if no cells are found
So that code line will error if there are no highlighted cells in the matched row

It would be useful if you upload a small data sample, example files
1.xlsx
2.xlsx