I have a spreadsheet with entries in column F that could be duplicates later on in F. I\'m looking to make something that does something like this pseudocode:
Whi
You don't need JS for this. You can do it with the built-in spreadsheet formulas.
It sounds like you want a similar answer that I gave to this question, with the difference being that you are checking two columns instead of just one.
You want this:
=if(AND(COUNTIF($A$1:$A2,A2)=1, COUNTIF($B$1:$B2,B2)=1), "", "Yes")
The key thing to notice is the use of the AND forumla.
This will fill down and look like this in subsequent rows:
=if(AND(COUNTIF($A$1:$A3,A3)=1, COUNTIF($B$1:$B3,B3)=1), "", "Yes")
=if(AND(COUNTIF($A$1:$A4,A4)=1, COUNTIF($B$1:$B4,B4)=1), "", "Yes")
...
And these are the results using your spreadsheet data as an example. This is assuming the formula was inserted into the Duplicate?
column (C2) and filled down:
A B C
1 Contact Name Duplicate?
2 email@example.com John
3 repeat.email@example.com Repeated Name
4 repeat.email@example.com Jane Yes
5 email3@example.com Repeated Name Yes