When you want a VLOOKUP (or other functions) to return nothing (or zero) when the looked up item do not exist, you use a combination of IF, ISNA and VLOOKUP, like this
=IF(ISNA(VLOOKUP(...your original VLOOKUP)),"",VLOOKUP(...Your Original VLOOKUP))
This will return "" (nothing) if the VLOOKUP data is not available, replace this with a zero if you want to return a zero. (The latter is generally better for SUM, but be careful when using in an AVERAGE, "" (nothing) will not be counted, zero will
Regards
Nick Hodge
Microsoft MVP, Excel
Southampton, UK