- Sub aa()
- t = Timer
- r = Sheets("Sheet1").Range("a" & Rows.Count).End(xlUp).Row
- arr = Sheets("Sheet1").Range("a2:c" & r)
- b5rr = YjhSort(arr, "a,1", "1,2H;5")
- c5rr = YjhSort(arr, "a,1", "1,3H;5")
- b6rr = YjhSort(arr, "a,1", "1,2H;6")
- c6rr = YjhSort(arr, "a,1", "1,3H;6")
- For i = 1 To UBound(b5rr)
- If b5rr(i, 1) * c5rr(i, 1) <> 0 Then
- b5rr(i, 1) = "两条记录充平"
- ElseIf arr(i, 2) = 0 And c5rr(i, 1) <> 0 Then
- b5rr(i, 1) = "两条记录充平"
- ElseIf arr(i, 3) = 0 And b5rr(i, 1) <> 0 Then
- brr(i, 1) = "两条记录充平"
- ElseIf b6rr(i, 1) + c6rr(i, 1) <> 0 Then
- b5rr(i, 1) = "两条记录未充平"
- ElseIf arr(i, 2) = 0 And c6rr(i, 1) <> 0 Then
- b5rr(i, 1) = "两条记录未充平"
- ElseIf arr(i, 3) = 0 And b6rr(i, 1) <> 0 Then
- b5rr(i, 1) = "两条记录未充平"
- Else
- b5rr(i, 1) = ""
- End If
- Next
- MsgBox Timer - t
- Sheets("Sheet1").Range("e2:e" & r) = b5rr
- 'Sheets("Sheet1").Range("f2:f" & r) = crr
- End Sub
复制代码 |