|I'm glad you found something that works, but I have a few comments/suggestions:|
First, by using F:G as your lookup_table , you are asking VLOOKUP to search the entire Column F - all 1,048,576 rows. It might be more efficient to only check the maximum number rows that you think you'll ever need. Even more efficient would be to use a Dynamic Named Range which can adjust itself to the actual size of the data.
Second, when you use IFERROR, you will get that "0" for any error that the VLOOKUP returns. Typically IF(ISNA(VLOOKUP(...) is used when you want to deal with a VLOOKUP that didn't find what it was looking for. That way, if some other error occurs, such as a #VALUE, #REF, etc., you'll know about it. IFERROR would essentially mask those errors and return "0", never letting you know that an actual error exists.
Finally, when you put quotes around a number, e.g. "0", Excel will return the text string 0, not the number 0. In most cases this won't matter, but there are certain functions that will deal with a "text number" differently than an actual number.
Drop the quotes and you'll get the number 0, which is what I believe you are looking for.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.