VBA – VLookup with Multiple Criteria in Excel without Excel Formula but with VBA

Ok, the title became too lengthy, but the idea is to try to duplicate the beauty of what this formula does:

And this is the cell of the formula above:

Anyway, the strange thing was that we have beautiful way to multiply boolean arrays in Excel and in VBA we have to go around it quite a lot. With plenty of code, actually. Asked a bit in StackOverflow, and some of the answers were actually pretty neat, but at the end I have decided to hardcode 2 functions instead of doing endless debugging after 3 months, if something goes south.

This is what I ended with:

It is pretty lengthy and probably one of the reasons VBA people are hated all over the world, but it works. Anyway, take a look at the StackOverflow question, some of the answers are decent and you will learn something from them.

Enjoy!