- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 41
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-2-16
![2024¦~¥þ¶Ô¼ú³¹ 2024¦~¥þ¶Ô¼ú³¹](images/common/dragon2024.png) ![2023¦~¥þ¶Ô¼ú³¹ 2023¦~¥þ¶Ô¼ú³¹](images/common/2023.png) ![2022ªê¦~¥þ¶Ô¼ú³¹ 2022ªê¦~¥þ¶Ô¼ú³¹](images/common/hu.gif) ![2021¤û¦~¥þ¶Ô¼ú³¹ 2021¤û¦~¥þ¶Ô¼ú³¹](images/common/niu.gif) ![2020¹«¦~¥þ¶Ô¼ú³¹ 2020¹«¦~¥þ¶Ô¼ú³¹](images/common/shu.gif) ![2019 ½Þ¦~¥þ¶Ô¼ú³¹ 2019 ½Þ¦~¥þ¶Ô¼ú³¹](images/common/zhu.gif) ![2018 ª¯¦~¥þ¶Ô¼ú³¹ 2018 ª¯¦~¥þ¶Ô¼ú³¹](images/common/gou.gif) ![2017 Âû¦~¥þ¶Ô¼ú³¹ 2017 Âû¦~¥þ¶Ô¼ú³¹](images/common/ji.gif) ![2016µU¦~¥þ¶Ô¼ú³¹ 2016µU¦~¥þ¶Ô¼ú³¹](images/common/hou.gif) ![2015¦Ï¦~¥þ¶Ô¼ú³¹ 2015¦Ï¦~¥þ¶Ô¼ú³¹](images/common/yang.gif) ![2014°¨¦~¥þ¶Ô¼ú³¹ 2014°¨¦~¥þ¶Ô¼ú³¹](images/common/ma.gif) ![2013³D¦~¥þ¶Ô¼ú³¹ 2013³D¦~¥þ¶Ô¼ú³¹](images/common/she.gif) ![2012Às¦~¥þ¶Ô¼ú³¹ 2012Às¦~¥þ¶Ô¼ú³¹](images/common/long.gif) ![½×¾Â°^Äm¾±³¹ ½×¾Â°^Äm¾±³¹](images/common/medal5.gif) ![¼ö¤ß¤½¯q¾±³¹ ¼ö¤ß¤½¯q¾±³¹](images/common/medal15.gif) ![2011¨ß¦~¥þ¶Ô¼ú³¹ 2011¨ß¦~¥þ¶Ô¼ú³¹](images/common/tu.gif)
|
¦^´_ 1# lone_tiger0303
«Øij¨Ï¥Î¼Ï¯Ã¤ÀªR
Y¥Hvba¥i°Ñ¦Ò¬Ý¬Ý- Sub MySumIF()
- ar = Array("¾Ç¥Í", "¹Å¼ú", "¤p¥\", "¤j¥\", "¤pp")
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- Set d2 = CreateObject("Scripting.Dictionary")
- With Sheet4
- For i = 1 To 3
- mysum = 0
- For Each a In .Range(.[B2], .[B65536].End(xlUp))
- d(a & ar(i)) = d(a & ar(i)) + a.Offset(, i)
- If IsNumeric(a.Offset(, i)) Then _
- mysum = mysum + a.Offset(, i): _
- d1(a & "") = d1(a & "") + a.Offset(, i): _
- d2(a & "") = d2(a & "") + a.Offset(, i)
- Next
- d("¤pp" & ar(i)) = mysum
- d1("¤pp") = ""
- d2("¤pp") = d2("¤pp") + mysum
- Next
- End With
- With Sheet3
- .[B5:F65536] = ""
- .[B5].Resize(, 5) = ar
- .[B6].Resize(d1.Count, 1) = Application.Transpose(d1.keys)
- For Each a In .Range(.[B6], .[B65536].End(xlUp))
- For i = 1 To 4
- a.Offset(, i) = IIf(i = 4, d2(a & ""), d(a & ar(i)))
- Next
- Next
- End With
- End Sub
- Sub MyCountIF()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- Set d2 = CreateObject("Scripting.Dictionary")
- With Sheet2
- For Each a In .Range(.[A2], .[A65536].End(xlUp))
- d(a & a.Offset(, 1)) = d(a & a.Offset(, 1)) + 1
- d1(a & "") = "": If a.Offset(, 1) <> "¦¨ÁZ" Then d2(a.Offset(, 1).Value) = ""
- Next
-
- End With
- With Sheet1
- .[B6:M65536] = ""
- .[B5].Resize(d1.Count, 1) = Application.Transpose(d1.keys)
- .[C5].Resize(, d2.Count) = d2.keys
- ar = d2.keys
- For Each a In .Range(.[B6], .[B65536].End(xlUp))
- For i = 0 To UBound(ar)
- a.Offset(, i + 1) = d(a & ar(i)): cnt = cnt + d(a & ar(i))
- Next
- a.Offset(, UBound(ar) + 2) = cnt: cnt = 0
- Next
- Set a = .[B65536].End(xlUp).Offset(1, 0)
- For i = 0 To UBound(ar)
- a.Offset(, i + 1) = Application.Sum(.Range(.[B5].Offset(, i + 1), a.Offset(-1, i + 1)))
- Next
- End With
- End Sub
½Æ»s¥N½X |
|