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

[µo°Ý] ½Ð°Ý¦U¦ì¦Ñ®v¡A¦p¦ó¨Ï¥ÎVBA ©î¤ÀÀx¦s®æ

[µo°Ý] ½Ð°Ý¦U¦ì¦Ñ®v¡A¦p¦ó¨Ï¥ÎVBA ©î¤ÀÀx¦s®æ

¦U¦ì¤j¤j¥i¥H±NA1Àx¦s­Ó¤º®e¡A¨Ï¥ÎVBA©î¤À¨ì¹ïÀ³ªº¦WºÙ¨Ì§Ç©¹¤U±Æ¶Ü?

test1.rar (6.77 KB)

¦U¦ì¤j¤j¥i¥H±NA1Àx¦s­Ó¤º®e¡A¨Ï¥ÎVBA©î¤À¨ì¹ïÀ³ªº¦WºÙ¨Ì§Ç©¹¤U±Æ¶Ü?
wsx1130 µoªí©ó 2022-7-23 22:54


½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Brr(1 To 50000, 1 To 12), Crr, a, i&, j%
Arr = [a1]: Crr = [c1:n1]
a = Split(Arr, Chr(10))
For i = 0 To UBound(a)
    For j = 1 To UBound(Crr, 2)
        If a(i) = "" Then Exit For
        If j = 7 Then Brr(i + 1, j) = Replace((Split(Split(a(i), Crr(1, j))(1), "T")(0)), " ", ""): GoTo 99
        If j = 11 Then Brr(i + 1, j) = Replace((Split(Split(a(i), Crr(1, j))(1), "E")(0)), " ", ""): GoTo 99
        If j = 12 Then Brr(i + 1, j) = "END": GoTo 99
        Brr(i + 1, j) = Replace((Split(Split(a(i), Crr(1, j))(1), "[")(0)), " ", "")
99:  Next j
Next i
[c2].Resize(UBound(a) + 1, 12) = Brr
End Sub

TOP

¦^´_ 1# wsx1130


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

Option Explicit
Sub TEST_1()
Dim Arr, Brr, a, i, j, b
a = Split([A1], Chr(10))
b = Mid([A1], 6, 1)
ReDim Brr(1 To UBound(a), 1 To 12)
For i = 0 To UBound(a) - 1
   Arr = Split(a(i), b)
   For j = 1 To 11
      Brr(i + 1, j) = Arr((j * 2 - 1))
   Next
   Brr(i + 1, 12) = "END"
Next
[C2].Resize(UBound(a), 12) = Brr
End Sub

«á½ú¨ü¯q¨}¦h!ÁÂÁ«e½úµoªí¦¹¥DÃD!

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD