返回列表 上一主題 發帖

[發問] 依據顏色判斷問題

回復 1# spermbank
  1. Sub ex()
  2. Dim A As Range
  3. For Each A In Range([A1], [A1].End(xlDown))
  4.   If A.Interior.ColorIndex = 44 And A.Offset(, 1).Interior.ColorIndex = 6 Then _
  5.   A.Offset(, 2).Interior.ColorIndex = 3 Else A.Offset(, 2).Interior.ColorIndex = -4142
  6. Next
  7. End Sub
複製代碼
學海無涯_不恥下問

TOP

        靜思自在 : 人的心地是一畦田,土地沒有播下好種子,也長不出好的果實。 -
返回列表 上一主題