Try

in D1
=IF(OR(NOT(ISNA(VLOOKUP(C1,A$1:A$1000,1,0))),NOT(ISNA(VLOOKUP(C1,B$1:B$1000,1,0)))),1,0)
copy down column D

Result of 1 indicates the valu of C is present in column A or B so
just use autofilter for when column D is 0