NBVC,

Is there any difference?
Yes, I am now using ReDim Preserve to adjust how many columns are used in the output array, instead of the Countif formula in worksheet Sheet1.