Conditional format cells based on match in another sheet
I'm not sure I am parsing the problem correctly, but I suspect this is the solution.

Make a new column in one of the pages that has a formula like...

=IF(thispage!D2=otherpage!D2,"*","")

This will make a column where all the duplicates have a *. Now simply make a conditional on the other column that turns the text yellow if there is a * in there.