I have two columns (A and B) with approximately 50,000 cells. Each cell (except row 1) in these columns contains a term in the following format: ABCD-EF-012345-678910. The numbers are the only thing that change in each cell and there are several duplicates of each term in the columns. The location of dashes and the ABCD-EF are the same in each of the cells.

I also have a column D that contains approximately 100 rows of partial matches of unique terms from columns (A and B) that I will continually be adding terms to. The column D cells contains a term in the following format: ABCD-EF-012345.

I want to conditionally format (with the same color) all cells in columns A and B that match the unique terms of Column D. I have placed an example below.

It would be preferable if I could enter a formula into the conditional formatting field that says: Format values where this formula is true

Thanks!