Thanks for the code. When I tried it, however, x = Round(Cells(l, i).Value, 3) had a mismatch