- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¦^´_ 9# shan0948
ÁÂÁ«e½ú
«á¾Ç½m²ßVBA¤è¦¡ªº¸Ñ¨M¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
°õ¦æµ²ªG:
Option Explicit
Sub TEST()
Dim Brr, i&, N&, T1&, T6$, T7$, T8$
Brr = Range([H4], Cells(Rows.Count, 1).End(3))
For i = 1 To UBound(Brr)
T1 = Val(Brr(i, 1)): T6 = Trim(Brr(i, 6)): T7 = Trim(Brr(i, 7))
T8 = Trim(Brr(i, 8))
Brr(i, 2) = "": Brr(i, 3) = "": Brr(i, 4) = "": Brr(i, 5) = ""
If T8 = "" Then GoTo 111
If T1 > 0 Then
N = i
If T8 = "°_" Then Brr(N, 2) = T6
If T8 = "¤î" Then Brr(N, 3) = T6
ElseIf T8 = "°_" Then
Brr(N, 2) = IIf(Brr(N, 2) = "", T6, Brr(N, 2) & "¡B" & T6)
ElseIf T8 = "¤î" Then
Brr(N, 3) = IIf(Brr(N, 3) = "", T6, Brr(N, 3) & "¡B" & T6)
If T7 = "Â÷¾" Then
Brr(N, 5) = IIf(Brr(N, 5) = "", T6, Brr(N, 5) & "¡B" & T6)
End If
End If
If T8 = "°_" And (T7 = "·s¶i" Or T7 = "¥L°VÂà¤J") Then
Brr(N, 4) = IIf(Brr(N, 4) = "", T6, Brr(N, 4) & "¡B" & T6)
End If
If T8 = "¤î" And T7 = "Â÷¾" Then
Brr(N, 5) = IIf(Brr(N, 5) = "", T6, Brr(N, 5) & "¡B" & T6)
End If
111
Next
[K4].Resize(N, 5) = Brr
End Sub |
|