=IF(ISERROR(VLOOKUP(D7,F:F,1,0)),D7,1)

 

ISERROR防止报错