You can use the SUMPRODUCT function instead of SUMIF.

SUMPRODUCT will work on closed files.