- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 196
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-9-6
![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)
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-1-12 00:10 ½s¿è
¦^´_ 8# adam2010
Sheets("¥æ´Á")ªºDÄæ¼Æ¶q¬O¤H¤u¥ý¿é¤J¦nªº¶Ü?
¸Õ¸Õ¬Ý- Sub ex()
- Dim Ar(), Ay(), C As Range, Rng As Range
- Set d = CreateObject("Scripting.Dictionary") '¼Æ¶q
- Set d1 = CreateObject("Scripting.Dictionary") '¤é´Á
- With Sheets("¥X³f¤é")
- For Each a In .Range(.[A2], .[A2].End(xlDown)) 'ª«®Æ
- Set Rng = a.EntireRow.SpecialCells(xlCellTypeConstants, xlNumbers) 'q³f
- ReDim Preserve Ar(s) '¼Æ¶q
- ReDim Preserve Ay(s) '¤é´Á
- Ar(s) = 0
- Ay(s) = .Cells(1, Rng.Column)
- s = s + 1
- For Each C In Rng
- cnt = cnt + C
- ReDim Preserve Ar(s)
- ReDim Preserve Ay(s)
- Ar(s) = cnt
- Ay(s) = .Cells(1, C.Column).Value
- s = s + 1
- Next
- d(a.Value) = Ar
- d1(a.Value) = Ay
- Erase Ar: Erase Ay: s = 0: cnt = 0
- Next
- End With
- With Sheets("¥æ´Á")
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- cnt = cnt + a.Offset(, 3)
- If cnt <= Application.Max(d(a.Value)) Or cnt - a.Offset(, 3) < Application.Max(d(a.Value)) Then _
- a.Offset(, 4) = Application.Lookup(cnt, d(a.Value), d1(a.Value)) _
- Else a.Offset(, 4) = "NA"
- If a <> a.Offset(1) Then cnt = 0
- Next
- End With
- End Sub
½Æ»s¥N½X |
|