Thank you for your replay Prince. I get the subscript out of range error at this line.

Code:
If varArrSheet1(lngCtr1, 5) = varArrSheet1(lngCtr2, 5) Then