Excel returns these errors when an element inside a formula is wrong, missing or not available. For a formula to work properly and to display the correct results, all elements from the formula must have correct values. On the other hand, #N/A errors are encountered when Excel cannot find a match for the value it's been told to find and it displays that message.
In order to avoid this error please use IF or COUNTIF instead of VLOOKUP and you will see the results will improve.