When I assign the expression wordsDT.Rows.IndexOf(row) + 1 to the rowIndex variable, to account for Excel sheets that start their index at 1 rather than 0, the + 1 (or any other addition) is ignored.
So a match is found in row 4 when it is actually in row 5 etc.
Changing the variable type from Generic to Integer doesn’t help.