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

VBA¦p¦ó§â¦r¦ê¤¤ªº­^¤å¦r«e´¡¤JªÅ®æ?

¥»©«³Ì«á¥Ñ s13030029 ©ó 2022-8-25 08:41 ½s¿è

¦^´_ 3# samwang
¦]¬°§Ú³o­Ó¬O­n³B²z¦P¤@Àx¦s®æ¤¤ªº¦r¦ê¡A¦Ó¥BÁÙ¦³´«¦æ¡A©Ò¥H¦bArrªº¦a¤è·|¦³¥X¿ù¡C
Â^¨ú.JPG

TOP

¥»©«³Ì«á¥Ñ s13030029 ©ó 2022-8-25 08:41 ½s¿è

¦^´_ 2# Andy2483
¦]¬°§Ú³o­Ó¬O­n³B²z¦P¤@Àx¦s®æ¤¤ªº¦r¦ê¡A¦Ó¥BÁÙ¦³´«¦æ¡A©Ò¥H¦bArrªº¦a¤è·|¦³¥X¿ù¡C
Â^¨ú.JPG

TOP

¦^´_ 1# s13030029

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test()
Dim Arr, i, x, T, j$, c
Arr = Range([A1], [A65536].End(3))
For i = 1 To UBound(Arr)
    j = Trim(Arr(i, 1))
    c = Len(j)
    For x = c To 2 Step -1
        T = UCase(Mid(j, x, 1))
        If Asc(T) > 64 And Asc(T) < 123 Then
            Arr(i, 1) = Replace(Arr(i, 1), T, " " & T)
        End If
   Next
Next
[B1].Resize(UBound(Arr), 1) = Arr
End Sub

TOP

¦^´_ 1# s13030029


    ½Ð«e½ú¸Õ¸Õ¬Ý

Option Explicit
Sub test()
Dim Arr, i, x, T, j$, c
Arr = Range([A1], [A65536].End(3))
For i = 1 To UBound(Arr)
   j = Trim(Arr(i, 1))
   c = Len(j)
   For x = c To 2 Step -1
      If UCase(Mid(j, x, 1)) Like "[A-Z]" Then
         j = Trim(Mid(j, 1, x - 1)) & " " & Mid(j, x, c * 2)
      End If
   Next
   Arr(i, 1) = j
Next
[B1].Resize(UBound(Arr), 1) = Arr
End Sub

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD