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

[µo°Ý] ½Ð°Ý¦p¦óÅýÀx¦s®æ¿é¤J5½X¼Æ¦r«á¡A¦Û°Ê¸õ¤U¤@®æ

[µo°Ý] ½Ð°Ý¦p¦óÅýÀx¦s®æ¿é¤J5½X¼Æ¦r«á¡A¦Û°Ê¸õ¤U¤@®æ

½Ð°Ý¦U¦ì¤j®v¡A¦p¦óÅýEXCEL  VBA¦Û°Ê§PÂ_¡A¦bÀx¦s®æ¿é¤J5½X¼Æ¦r¤§«á¡A¥i¥H¦Û°Ê¸õ¨ì¤U¤@®æ©O¡H¨Ò¦p¡AA1¿é¤J¥ô·N¤­¦ì¼Æ¤§«á¡A¦Û°Ê¸õÂà¨ìA2¡A¥i¥H¤£¥Î¦Û¤v«öenterÁä¡A«ô°U¦U¦ì¤j®v«ü¾É¡AÁÂÁ±z

Àx¦s®æ¨S¦³³o¥\¯à~~
¥¼«öENTER«e, ¤°»ò³£¤£¦¨¥ß~~

TOP

­ã¤j»¡±o¹ï, °h¤@¨B¤èªk, «öENTER«á³B²z¤À³Î¡C
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Cells.Count > 1 Then Exit Sub
  3. Dim s$, a
  4. Application.EnableEvents = 0
  5. Application.ScreenUpdating = 0
  6. s = Target.Value
  7. With CreateObject("vbscript.regexp")
  8.     .Pattern = "(.{5})"
  9.     .Global = True
  10.     a = Split(.Replace(s, "$1" & Chr(10)), Chr(10))
  11.     Target.Resize(UBound(a) + 1) = Application.Transpose(a)
  12.     Target.Offset(UBound(a) + 1).Activate
  13. End With
  14. Application.EnableEvents = 1
  15. Application.ScreenUpdating = 1
  16. End Sub
½Æ»s¥N½X

zz.zip (12.8 KB)

TOP

­ã¤j»¡±o¹ï, °h¤@¨B¤èªk, «öENTER«á³B²z¤À³Î¡C
ikboy µoªí©ó 2020-3-19 15:02

ÁÂÁ­ã¤j¸òikboy¤j¤jªº«üÂI¡A§Úªº´y­z¦³»~¡A§Ú¥D­nªº¥Øªº¬O·Q­n¤F¸Ñ¦p¦ó§Q¥Î±½´y¾¹±½´y±ø½X¤§«á¡A¥i¥H¦b±½´yµ²§ô¡A´N¸õ¨ì¤U¤@®æ¡A¹F¨ì§Ö³t±½´yªºµ²ªG¡A§Ú¥ý¥Îikboy¤j«ü¾Éªº¤è¦¡¸Õ¬Ý¬Ý¡AÁÂÁ±z

TOP

¦^´_ 4# kaui700


    ¦L¶H¤¤±½´y¾¹¥i¥H³]©w±½§¹±ø½X«á¦Û°Ê¿é¤Jenter¡A
    ¥i¥H¥h¬Ý¬Ý»¡©ú®Ñ¯à§_³]©w¡C

TOP

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Column <> 1 Or .Count > 1 Then Exit Sub
     If .Value <> "" Then .Cells(2, 1).Select
End With
End Sub

TOP

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Column  1 Or .Count > 1 T ...
­ã´£³¡ªL µoªí©ó 2020-3-20 11:36



   ÁÂÁ­ã¤jªº«ü¾É

TOP

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