
etc
Private Sub Workbook_Sheetchange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 3 Then '假如数据在C列
Target.Select
If Target.Value = 0.5 Then ' With Cells(Target.Row, Target.Column).Interior With Target.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 255 '红色 .TintAndShade = 0 .PatternTintAndShade = 0 End WithElse With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent1 '蓝色 .TintAndShade = 0 .PatternTintAndShade = 0 End WithEnd IfEnd IfEnd Sub
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号