返回列表 上一主題 發帖

[發問] 請各位高手協助,謝謝您

回復 1# usana642

工作表模組
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Column > 11 Then Exit Sub
  3. Set d = CreateObject("Scripting.Dictionary")
  4. LR = [A65536].End(xlUp).Row
  5. For I = 1 To LR - 1
  6.    For J = 2 To 10 Step 2
  7.      d(Cells(I, J).Value) = ""
  8.    Next J
  9.    If d.exists(Cells(LR, 2).Value) And d.exists(Cells(LR, 4).Value) And d.exists(Cells(LR, 6).Value) And d.exists(Cells(LR, 8).Value) And d.exists(Cells(LR, 10).Value) Then
  10.      MsgBox "與第" & I & "列重覆"
  11.    End If
  12.    d.RemoveAll
  13. Next I
  14. End Sub
複製代碼

TOP

        靜思自在 : 待人退一步,愛人寬一寸,就會活得很快樂。
返回列表 上一主題