if countif and data.xlsx

I am trying to do a if countif and all in one.
I came as far as =IF(COUNTIF(F2:F3,F2)>1,0,1) which is in column C currently.
What I am looking to do is, if the value in column F occurs more than once, count only the first occurrence and if it only occurs once, count as 1. This is what I was able to do in Column C.
I also need to add the additional criteria that when the value in Column H is "Existing", it should return a 0 instead of 1.
The new formula can be in Column D

I tried something like this: =IF(AND(IF(COUNTIF(F2:F3,F2)>1,0,1),H3="Existing")=1,0,1) but it doesn't seem to work. Help!