2013-09-16 36 views

回答

1

该宏将使用当前选定的范围并检查每个单元的merchant_id。然后标记栗色如果是真的。要选择特定的颜色,最好的方法是记录一个宏,并查看它创建的值。取这些数字并替换With区块的内容

Sub MarkCellsInSelection() 
    For Each c In Selection 
     If c.Value = "merchant_id" Then 

      With c.Interior 
       .Pattern = xlSolid 
       .PatternColorIndex = xlAutomatic 
       .ThemeColor = xlThemeColorAccent2 
       .TintAndShade = 0.399975585192419 
       .PatternTintAndShade = 0 
      End With 
     End If 
    Next 
End Sub 
相关问题