2013-09-16 43 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 
相關問題