我看了你发的文件,是将Sheet3的数据按条件写到sheet1里:Sub ouyangff()t = 5With Sheet3For i = 2 To .[d65536].End(3).Row
For j = i + 1 To .[d65536].End(3).Row
If .Cells(i, 4) = .Cells(j, 4) Then
If .Cells(i, 1).Cells(j, 1) Then
.Rows(i).Interior.ColorIndex = 8
.Rows(j).Interior.ColorIndex = 8
Sheet1...