ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó§Ö³t½Æ»s³Ñ¤U¨S³Q¿ï¦±ªº?

¦^´_ 10# av8d
play.gif
  1. Private Sub CommandButton1_Click() '¤Ï¿ï
  2. Application.EnableEvents = False
  3. Dim Rng As Range
  4. For Each a In Range("C:C").SpecialCells(xlCellTypeBlanks)
  5. If Rng Is Nothing Then
  6.   Set Rng = Union(Cells(a.Row, "B"), Cells(a.Row, "D"))
  7.   Else
  8.   Set Rng = Union(Rng, Union(Cells(a.Row, "B"), Cells(a.Row, "D")))
  9. End If
  10. Next
  11. Rng.Copy [J1]
  12. Rng.Copy Sheets(3).[B2]
  13. Application.EnableEvents = True
  14. End Sub

  15. Private Sub CommandButton2_Click() '¿ï¨ú
  16. Application.EnableEvents = False
  17. Dim Rng As Range
  18. Set Rng = Union([B1], [D1])
  19. For Each a In Range("C:C").SpecialCells(xlCellTypeConstants)
  20.   Set Rng = Union(Rng, Union(Cells(a.Row, "B"), Cells(a.Row, "D")))
  21. Next
  22. Range("J1").CurrentRegion.Clear
  23. Rng.Copy [J1]
  24. Sheets(3).[B2].CurrentRegion.Clear
  25. Rng.Copy Sheets(3).[B2]
  26. Application.EnableEvents = True

  27. End Sub

  28. Private Sub Worksheet_SelectionChange(ByVal Target As Range) '¥´¤Ä
  29. If Cells(Target.Row, 1) <> "" Then Cells(Target.Row, 3) = IIf(Cells(Target.Row, 3) = "", "v", "")
  30. End Sub
½Æ»s¥N½X
¤Ï¿ï.zip (21.77 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 15# av8d
Private Sub Worksheet_SelectionChange(ByVal Target As Range) '¥´¤Ä
If Cells(Target.Row, 1) <> "" And Target.Column = 3 Or Target.Column = 4 Then Cells(Target.Row, 3) = IIf(Cells(Target.Row, 3) = "", "v", "")
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 20# av8d
¥þ¿ï¬Æ»ò¦ì¸m?
¨Ò¦pCÄæ¥þ¿ï
[C:C].Select
¦]¬°§A¦³¤u§@ªí¨Æ¥óµ{§ÇSelection_Change
©Ò¥HÁקKIJµoµ{§Ç
Application.EnableEvents = False
[C:C].Select
Application.EnableEvents = True
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD