I'm trying to write a function that would do the following:

If two cells in a row are the same as two cells in any row ABOVE that row, then I'd like the cell with the formula to read "False". For example, if the sheet looks like this for columns A through D, and rows 1 through 5, how should I format the cells in column D?

A B C D

1 X Y E E
2 X Z E E
3 Z X E E
4 Z Y E E
5 X Z E FALSE

Any suggestions? Thanks so much -