| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥xÆW°ò¶© µù¥U®É¶¡2010-5-1 ³Ì«áµn¿ý2022-1-23 
         
 | 
                
| ¦^´_ 4# freeffly ¸Õ¸Õ¬Ý
 ½Æ»s¥N½XOption 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
 | 
 |