|
- Sub °′Å¥1_Click()
- Application.ScreenUpdating = False
- Dim arr(1 To 2)
- Set rzx = Nothing
- Set rzd = Nothing
- Set rdy = Nothing
- Set rjj = Nothing
- [aj:al].Copy [aa1]
- [ao:aq].Copy [ae1]
- For k = 3 To Cells(Rows.Count, "aa").End(3).Row Step 4
- For i = 27 To 33 Step 4
- Set Rng = Cells(k - 1, i).Resize(1, 3).Find("½±½e", lookat:=xlWhole)
- c = Rng.Column
- If rjj Is Nothing Then
- Set rjj = Rng.Offset(1).Resize(2)
- Else
- Set rjj = Union(rjj, Rng.Offset(1).Resize(2))
- End If
- a = 1
- For w = i To i + 2
- If w <> c Then
- arr(a) = w
- a = a + 1
- End If
- Next w
- For j = k To k + 1
- If Cells(j, arr(1)) < Cells(j, arr(2)) Then
- If rzx Is Nothing Then
- Set rzx = Cells(j, arr(1))
- Set rzd = Cells(j, arr(2))
- Else
- Set rzx = Union(rzx, Cells(j, arr(1)))
- Set rzd = Union(rzd, Cells(j, arr(2)))
- End If
- Else
- If Cells(j, arr(1)) > Cells(j, arr(2)) Then
- If rzx Is Nothing Then
- Set rzx = Cells(j, arr(2))
- Set rzd = Cells(j, arr(1))
- Else
- Set rzx = Union(rzx, Cells(j, arr(2)))
- Set rzd = Union(rzd, Cells(j, arr(1)))
- End If
- Else
- If rdy Is Nothing Then
- Set rdy = Union(Cells(j, arr(1)), Cells(j, arr(2)))
- Else
- Set rdy = Union(rdy, Cells(j, arr(1)), Cells(j, arr(2)))
- End If
- End If
- End If
- Next j
- Next i
- Next k
- If Not rjj Is Nothing Then rjj.Interior.ColorIndex = 5: rjj.Value = "½±½e"
- If Not rzd Is Nothing Then rzd.Interior.ColorIndex = 3: rzd.Value = "×î′ó"
- If Not rzx Is Nothing Then rzx.Interior.ColorIndex = 7: rzx.Value = "×îD¡"
- If Not rdy Is Nothing Then rdy.Interior.ColorIndex = 9: rdy.Value = "μèóú"
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|