- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
¥»©«³Ì«á¥Ñ samwang ©ó 2022-1-19 08:04 ½s¿è
¦^´_ 1# gaishutsusuru
¥u·|VBA¡A¶È¨Ñ°Ñ¦Ò¡AÁÂÁÂ
Sub test()
Dim Arr, Brr, a, xD, T$, i&, i1&
Brr = Range([e4], [e65536].End(3).Offset(, 2))
Arr = Range([a4], [b65536].End(3))
For i1 = 1 To UBound(Brr)
T = Brr(i1, 1)
For i = 1 To UBound(Arr)
a = Split(Arr(i, 2), " ")
For j = 0 To UBound(a)
If InStr(a(j), ",") Then a(j) = Replace(a(j), ",", "")
If InStr(a(j), ".") Then a(j) = Replace(a(j), ".", "")
If a(j) = T Then
Brr(i1, 2) = Brr(i1, 2) + 1
Brr(i1, 3) = IIf(Brr(i1, 3) = "", Arr(i, 1), Brr(i1, 3) & "," & Arr(i, 1))
End If
Next
Next
Next
Range("e4").Resize(UBound(Brr), 3) = Brr
End Sub |
-
-
1.JPG
(18.62 KB)
|