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

¥X²{"¨S¦³³]©wª«¥óÅܼƩÎWith°Ï¶ôÅܼÆ"

¥X²{"¨S¦³³]©wª«¥óÅܼƩÎWith°Ï¶ôÅܼÆ"

¦U¦ì¤j¤j¦n,

·Q½Ð±Ð¤j¤j¤@¤U¡A°õ¦æ¦¹µ{¦¡®É³£·|¥X²{

°õ¦æ¶¥¬q¿ù»~¡¦91¡¦

¨S¦³³]©wª«¥óÅܼƩÎWith°Ï¶ôÅܼÆ



µ{¦¡³£·|°±¯d¦b¬õ¦âªº¦a¤è¡C¤£ª¾­n¦p¦ó¸Ñ¨M


Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = True
If ToggleButton3.Value = True Then
    r = Columns("C").Find("¤p­p:", lookat:=xlWhole).Row
    If Target.Address Like "$A$*" And Target.Row >= 16 And Target.Row < r Then
    Application.EnableEvents = False
    For Each A In Target
    Set RNG = Sheets("°Ñ·Óªí").Columns("A").Find(A, lookat:=xlWhole)
      If RNG Is Nothing Then MsgBox "¯Á¤Þ¤£¦s¦b": Application.EnableEvents = True: Exit Sub
      A.Offset(, 2) = RNG.Offset(, 1): A.Offset(, 3) = RNG.Offset(, 7)
      A.Offset(, 7) = RNG.Offset(, 3): A.Offset(, 8) = RNG.Offset(, 4)
      A.Offset(, 9) = RNG.Offset(, 6): A.Offset(, 10) = RNG.Offset(, 5)
      A.Offset(, 12) = RNG.Offset(, 2)
    Next
    ToggleButton1.Caption = "¦WºÙ+³W®æ"
    ToggleButton2.Caption = "¼tµP+«¬¸¹"
    Application.EnableEvents = True
    End If
Else
    r = Columns("C").Find("¤p­p:", lookat:=xlWhole).Row
   If Target.Address Like "$A$*" And Target.Row >= 16 And Target.Row < r Then
    Application.EnableEvents = False
    For Each A In Target
    Set RNG = Sheets("°Ñ·Óªí").Columns("A").Find(A, lookat:=xlWhole)
      If RNG Is Nothing Then MsgBox "¯Á¤Þ¤£¦s¦b": Application.EnableEvents = True: Exit Sub
      'A.Offset(, 3) = RNG.Offset(, 7)
      A.Offset(, 7) = RNG.Offset(, 3): A.Offset(, 8) = RNG.Offset(, 4)
      A.Offset(, 9) = RNG.Offset(, 6): A.Offset(, 10) = RNG.Offset(, 5)
      A.Offset(, 12) = RNG.Offset(, 2)
    Next
    ToggleButton1.Caption = "¦WºÙ+³W®æ"
    ToggleButton2.Caption = "¼tµP+«¬¸¹"
    Application.EnableEvents = True
    End If
End If
End Sub

¦^´_ 1# zamamilo
¨S¦³³]©wª«¥óÅܼƩÎWith°Ï¶ôÅܼƠ  :ª«¥óÅܼƨS³]©w¦n
r = Columns("C").Find("¤p­p:", lookat:=xlWhole).Row   ¨S§ä¨ì "¤p­p" ·|¦³¿ù»~
§ï¦¨:
  1. If Not Columns("C").Find("¤p­p:", lookat:=xlWhole) Is Nothing Then
  2.         r = Columns("C").Find("¤p­p:", lookat:=xlWhole).Row
  3.     Else
  4.         r = 1  
  5.     End If
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD