...his conditional, "if two or more rows..."
requires an array formula anyway. And, I'm
reluctant to use SUMPRODUCT with only 1
argument since Help specifies that its
arguments should be "2 to 30 arrays..."
I'd be more inclined to use...
=SUMPRODUCT((A1:A5=B1:B5)+0,C1:C5)
I assume this is a print macro. What have you designated as the print area? if the data to be printed does not form a squaare, you may be getting a lot of blank cells being printed. If this is the case, you can either specify which pages to print, or break the print commands into 2 parts, each specifying a different area of data as the print area.
Thanks for responding. THe problem is this is a macro that is supposed to work with all kinds of data. So, I want to know how to code the macro so that it can set the Print Area at the end.