Sub xx()
For Each c In [d14:h23]
If c Mod 5 = c.Offset(-1, -1) Mod 5 Then c.Interior.ColorIndex = 3
If c Mod 5 = c.Offset(-1, 1) Mod 5 Then c.Interior.ColorIndex = 7
Next
End Sub
追é®ä»C14å°Iæåç»æ
ä¸è¦æ§è¡ä»£ç ï¼èªå¨å¡«å
ï¼å°ä»£ç æ¾å°è¡¨ç模ååªç§ï¼
追çPrivate Sub Workbook_SheetActivate(ByVal Sh As Object)
For Each c In [c14].CurrentRegion
If c <> "" And IsNumeric(c) Then
If c.Offset(-1, -1) <> "" And IsNumeric(c.Offset(-1, -1)) Then If c Mod 5 = c.Offset(-1, -1) Mod 5 Then c.Interior.ColorIndex = 3
If c.Offset(-1, 1) <> "" And IsNumeric(c.Offset(-1, 1)) Then If c Mod 5 = c.Offset(-1, 1) Mod 5 Then c.Interior.ColorIndex = 7
End If
Next
End Sub
追é®ä»£ç ç²å°è¡¨ç模åäº
ä½æ¯æ²¡æååå¢ï¼
追ç