- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 4# freeffly
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim i As Single, r As String, xMin As Double, xMax As Double
- Cells.Interior.ColorIndex = xlNone
- i = 2
- r = i
- Do While Cells(i, "a") <> ""
- If Cells(i, "a") <> Cells(i + 1, "a") Then
- With Range("A" & r & ":" & "A" & i).Offset(, 5).Resize(, 4)
- 'Offset(, 5) =>AÄæ¨ì5¤ëªºÄæ¼Æ(FÄæ)
- 'Resize(, 4) =>4Äæ (5¤ë-8¤ë )
- xMin = Application.Min(.Cells)
- xMax = Application.Max(.Cells)
- If xMin <> 0 And xMax <> 0 Then
- .Cells.Replace xMin, "=err", xlWhole
- With .SpecialCells(xlCellTypeFormulas, xlErrors)
- .Cells = xMin
- .Interior.ColorIndex = IIf(xMin <> xMax, 38, 34)
- End With
- If xMin <> xMax Then
- .Cells.Replace xMax, "=err", xlWhole
- With .SpecialCells(xlCellTypeFormulas, xlErrors)
- .Cells = xMax
- .Interior.ColorIndex = 8
- End With
- End If
- End If
- End With
- r = i + 1
- End If
- i = i + 1
- Loop
- End Sub
½Æ»s¥N½X |
|