I have a formula that I would like to change into a UDF.

Formula: copy to clipboard
=IF(COUNTIF(Sheet2!$A$2:$A$1000,A2)=1,"X"," ")


How would I do this? Any help would be greatly appreciated.

Thanks