½Ð°Ý¦p¦ópºâ¥[Á`¥X¤H¦W+¼Æ¦r=¼Æ¦rÁ`¦X
- ©«¤l
- 47
- ¥DÃD
- 23
- ºëµØ
- 0
- ¿n¤À
- 133
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- sp2
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-6-25
- ³Ì«áµn¿ý
- 2024-10-22
|
½Ð°Ý¦p¦ópºâ¥[Á`¥X¤H¦W+¼Æ¦r=¼Æ¦rÁ`¦X
|
|
|
|
|
|
- ©«¤l
- 1387
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 1397
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-11
- ³Ì«áµn¿ý
- 2024-11-25
|
|
google"EXCEL°g" blog ©Îgoogleºô§}:https://hcm19522.blogspot.com/
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 1# ªü¦tô
ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾ÇÂǦ¹ÃD½m²ßVBA_°}¦C»P¦r¨å!
¤£ª¾¹D¬O§_·|¿ùÃD·N?
½d¨Ò½Ð¸Õ¸Õ¬Ý!
20221102_4.zip (52.15 KB)
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub ¦r¨å»P°}¦C½m²ß()
Dim Brr, Crr, c&, i&, x&, xR, Y, U, ERR&
Set Y = CreateObject("Scripting.Dictionary")
Brr = Range([¾Þ§@ªí!B2], [¾Þ§@ªí!B65536].End(3))
For i = 1 To UBound(Brr)
If Trim(Brr(i, 1)) = "" Then ERR = 1: GoTo 111
Crr = Split(Trim(Brr(i, 1)), " ")
U = Trim(Crr(0)) & Y(Trim(Crr(0)) & i)
Crr = Split(Replace((Brr(i, 1)), " ", ""), U)
If UBound(Crr) <= 1 Then ERR = 1: GoTo 111
For x = UBound(Crr) To 2 Step -1
If IsNumeric(Trim(Crr(x))) = False Then
ERR = 1: GoTo 111
End If
Y(U & i) = Y(U & i) + Val(Trim(Crr(x)))
Next
Next
111
If ERR = 1 Then
Cells(i + 1, 2).Activate
ActiveCell.Interior.ColorIndex = 38
MsgBox "½ÐÀˬd¸ê®Æ!"
Exit Sub
End If
[C2].Resize(Y.Count, 1) = Application.Transpose(Y.ITEMS)
End Sub |
|
|
|
|
|
|