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

[µo°Ý] »ù®æ§R°£±i¼Æ¦Û°Ê§R°£

¦^´_  coafort

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With  ...
samwang µoªí©ó 2022-1-27 10:20


½Ð°Ý¤j¤j
¦pªG¦P¤@Äæ
3~23
27~40
»Ý­n³o­Ó¥\¯à
½Ð°Ý¸Ó«ç»ò§ï©O¡H
§Ú§ï¦¨¥H¤U¡A¥u¦³3~23¦³³o¥\¯à¡A27~40¨S¦³
ÁÂÁ¤j¤j
  If .Column = 16 Then
        If .Row < 3 Then Exit Sub
        If .Row > 23 Then Exit Sub
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 16 Then
        If .Row < 27 Then Exit Sub
        If .Row > 40 Then Exit Sub
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If

TOP

½Ð°Ý¤j¤j
¦pªG¦P¤@Äæ
3~23
27~40
»Ý­n³o­Ó¥\¯à
½Ð°Ý¸Ó«ç»ò§ï©O¡H
§Ú§ï¦¨¥H¤U¡A¥u¦³3~23¦³³o¥\¯à¡A ...
coafort µoªí©ó 2022-1-29 08:56


      If .Column = 16 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit Sub
         If .Row = 26 Then Exit Sub
         If .Count > 1 Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If

TOP

If .Column = 16 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit  ...
samwang µoªí©ó 2022-1-29 12:21


¤j¤j±z¦n
3~40·í¤¤
24~26³o¤T¦C¬O¤£»Ý­nªº
¤j¤jªº¤è¦¡¦n¹³¥u¦³26
ÁÙ¬O»¡¥t¥~24 25¤]¬O­n¿é¤J©O¡H
ÁÂÁ¤j¤j

TOP

¤j¤j±z¦n
3~40·í¤¤
24~26³o¤T¦C¬O¤£»Ý­nªº
¤j¤jªº¤è¦¡¦n¹³¥u¦³26
ÁÙ¬O»¡¥t¥~24 25¤]¬O­n¿é¤J©O¡H
...
coafort µoªí©ó 2022-1-29 12:44


If .Row >= 24 And .Row <= 26 Then Exit Sub

TOP

If .Row >= 24 And .Row
samwang µoªí©ó 2022-1-29 13:56


ÁÂÁ¤j¤j
²×©ó¥i¥H¤F
¦³¤j¤j¯u¦n
¯¬ºÖ¤j¤jªê¦~¦æ¤j¹B
·s¦~¤j§Ö¼Ö:D

TOP

½Ð°Ý¤j¤j¡A¤U¦C­n¦p¦ó¾ã¦X©O¡H
§Ú¥Î¤À³Î½u¤À¹j
¤]´N¬O²Ä¤G²Ä¤Tªº¤u§@ªí¬O³o­Ó
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Target
    If .Worksheet.Index = 1 Then Exit Sub
    If .Worksheet.Index > 3 Then Exit Sub
    If .Column = 41 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 27 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 1 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 16 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit Sub
         If .Row >= 24 And .Row <= 26 Then Exit Sub
         If .Count > 1 Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
    If .Column = 20 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit Sub
         If .Row >= 24 And .Row <= 26 Then Exit Sub
         If .Count > 1 Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If


²Ä¥|²Ä¤­ªº²Ä¤C²Ä¤K¤u§@ªí¬O³o­Ó
================================================================
    If .Worksheet.Index = 6 Then Exit Sub
    If .Worksheet.Index > 4 Then Exit Sub
    If .Worksheet.Index > 8 Then Exit Sub
    If .Column = 45 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 30 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 1 Then
        If .Count > 1 Then Exit Sub
        If .Value = "" Then .Offset(, 1).ClearContents
        End If
    If .Column = 17 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit Sub
         If .Row >= 24 And .Row <= 26 Then Exit Sub
         If .Count > 1 Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
    If .Column = 22 Then
         If .Row < 3 Then Exit Sub
         If .Row > 40 Then Exit Sub
         If .Row >= 24 And .Row <= 26 Then Exit Sub
         If .Count > 1 Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
  End With
End Sub
ÁÂÁ¤j¤j

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-7-21 08:46 ½s¿è

¦^´_ 26# coafort


    ÁÂÁ«e½ú
«á¾ÇÂǦ¹©«¾Ç²ß¨ì Workbook.SheetChange ¨Æ¥ó
¥H¤U¬O¾Ç²ß¤è®×,½Ð«e½ú°Ñ¦Ò

Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim Wi%, Wc%, Wr&
'¡ô«Å§iÅܼÆ
With Target
   If .Count > 1 Then Exit Sub
   '¡ô¥ô¦óªí¥u­nÅܧó®æ¤j©ó1®æ´Nµ²§ôµ{¦¡°õ¦æ
   Wi = .Worksheet.Index: Wc = .Column: Wr = .Row
   '¡ô¥OWi¬O IJµo¤u§@ªí¯Á¤Þ¸¹,¥OWc¬O IJµoÄ渹,¥OWr¬O IJµo¦C¸¹

'////²Ä¤G²Ä¤Tªº¤u§@ªí////

   If InStr("/2/3/", "/" & Wi & "/") Then
   '¡ô¦pªGIJµoªí¯Á¤Þ¸¹¬O 2©Î3 ??
      If InStr("/1/27/41/", "/" & Wc & "/") Then
      '¡ô¦pªGIJµoÄæ¬O 1,27©Î41
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
      If InStr("/16/20/", "/" & Wc & "/") Then
         If Wr < 3 Or Wr > 40 Or (Wr >= 24 And Wr <= 26) Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
         '¡ô¦pªGIJµo¦C¬O 3~23 ©Î 27~40
      End If
   End If

'////²Ä¥|²Ä¤­ªº²Ä¤C²Ä¤K¤u§@ªí////
   If InStr("/4/5/7/8/", "/" & Wi & "/") Then
   '¡ô¦pªGIJµoªí¯Á¤Þ¸¹¬O 4,5,7©Î8 ??
      If InStr("/1/30/45/", "/" & Wc & "/") Then
      '¡ô¦pªGIJµoÄæ¬O 1,30©Î45
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
      If InStr("/17/22/", "/" & Wc & "/") Then
         If Wr < 3 Or Wr > 40 Or (Wr >= 24 And Wr <= 26) Then Exit Sub
         If .Value = "" Then .Offset(, 1).ClearContents
      End If
   End If
End With
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ÁÂÁ«e½ú
«á¾ÇÂǦ¹©«¾Ç²ß¨ì Workbook.SheetChange ¨Æ¥ó
¥H¤U¬O¾Ç²ß¤è®×,½Ð«e½ú ...
Andy2483 µoªí©ó 2023-7-21 08:41


¯u¬O«D±`·PÁ¤j¤jÀ°¦£
¥i¥H¤F
ÆgÆg

TOP

¦^´_ 28# coafort


    ®¥³ß
«á¾Ç»{¬°¥Î¤u§@ªí¯Á¤Þ¸¹¿ëÃÑ ­·ÀI°ª(¸U¤@¤£¤p¤ßÅܰʶ¶§Ç)
«ØijÁÙ¬O¥H¤u§@ªí¦W¿ëÃѤñ¸û¦n
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ®¥³ß
«á¾Ç»{¬°¥Î¤u§@ªí¯Á¤Þ¸¹¿ëÃÑ ­·ÀI°ª(¸U¤@¤£¤p¤ßÅܰʶ¶§Ç)
«ØijÁÙ¬O¥H¤u§@ªí ...
Andy2483 µoªí©ó 2023-7-21 09:10



¯uªº«Ü¦n¥Î
¯uªº«Ü·PÁ·|VBªº¦w­}¤j¤j

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD