By contrast, it is certain that there will be some cost to developing the code, testing it, and maintaining it. So, the benefits of the optimizations below are somewhat uncertain.
I don’t know what, if any, problems the first solution will run into nor do I know how slow the solution based on first principles will be. The disadvantage, of course, is that it checks each cell in Rng1 and consequently might be slow under certain circumstances.īefore proceeding further, one should remember that the need for any optimization is unproven. We don’t have to worry about whether they consist of multiple areas or not. The advantage of working from first principles is that it works correctly irrespective of the shape of the two arguments Rng1 and Rng2.