返回列表 上一主題 發帖

[發問] Worksheet_Change多條件

回復 1# simon552614


A:   
If Target.Column = 3 Or Target.Column = 6 Or Target.Column = 9 Then
   MsgBox ("OK")
End If

B:
With Target
   If InStr("3,6,9", .Column) Then
      MsgBox ("OK")
   End If
End With

C:
With Target
   If InStr("3,6,9", .Column) And .Count = 1 Then
      MsgBox ("OK")
   End If
End With

D:
With Target
   If InStr("3,6,9", .Column) And .Count = 1 And .Row > 10 Then
      MsgBox ("OK")
   End If
End With
用行動裝置瀏覽論壇學習很方便,謝謝論壇經營團隊
請大家一起上論壇來交流

TOP

        靜思自在 : 發脾氣是短暫的發瘋。
返回列表 上一主題