How can I compare data in two different sheets in an Excel workbook?

=IF(ISNA(VLOOKUP(A1931, ONPremesis_LastLogonTime!$A$1:$A$19622, 1, FALSE)), 0, 1)