ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¤½¦¡»P°ò¥»§Þ¥©ºt½m

B­ì«h¤W¤]ºâ«O¯d¦r
­Y¿é¤JB¡AEXCEL·|¦Û°Ê§ï¦¨bb
Åã¥Ü¼Æ­È¥H1900¦~¬°43°_ºâªº¦~«×
1900¦~¤é´ÁÅã¥Ü¦¨43
1901¦~¤é´ÁÅã¥Ü¦¨44
¥H¦¹Ãþ±À
¥[¤WÅå¹Ä¸¹!©Î¤Ï±×½u\©Î¥ÎÂù¤Þ¸¹""
³£¥Nªí¨Ï¥Î¦r¤¸
¥u¬O¤Ï±×½u·|³QEXCEL¦Û°ÊÂনÅå¹Ä¸¹
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-3-17 08:48 ½s¿è

¦^´_ 39# FAlonso
³o½g­«ÂI¦b©ó°ò¥»§Þ¥©ºt½m¡A¨Ã¤£¹ªÀy¨Ï¥ÎVBA©Î¨ç¼Æ¸ÑÃD
¬JµM¥S¥x¨Ï¥ÎVBA¨Ó°µ¡A¦Ó¥B±z¤]´£¨ì¤@¨ÇVBA¨Ï¥Î¤Wªº§xÂZ
©³¤Uµ{¦¡½X¨Ñ±z°Ñ¦Ò¬Ý¬Ý
±z·|µo¥Í¿ù»~­ì¦]¥i¯àµo¥Í¦b
dictionaryª«¥ó¥[¤J¶µ¥Øªº¤èªk
±z¨Ï¥Î¤Fadd¤èªk¨Ó¥[¤J¶µ¥Ø
dictionaryª«¥ó¦³¤@­Ó¯S©Ê¡A´N¬O¯Á¤Þ­È¤£¯à­«ÂÐ
·íadd¤èªk¥[¤J¯Á¤Þ®É¡A­Y¸Ó¯Á¤Þ­È¤w¸g¦s¦b´N·|²£¥Í¿ù»~
ÁקK¦¹±¡ªpµo¥Í¡A¥i¥Îexists¤èªk¥ý§PÂ_¯Á¤Þ­È¬O§_¦s¦b¡AµM«á¦A¨M©w¬O§_¥[¤J
¦b±zªº¬yµ{¤¤dictionaryª«¥ó¬O¥Î¤£¨ìªº
¦Ó©³¤Uµ{¦¡½X§Q¥Îªº¤èªk¬Oª½±µ«ü©w¯Á¤Þ­È¹ïÀ³ªº­È
³o¼Ë¡A­È·|§ïÅÜ¡A¦ý¤£·|¦³­«½Æ¯Á¤ÞºÃ¼{
¦A«h±z´£¨ì³t«×°ÝÃD
¥[§Ö³t«×ªº¤èªk¦]­Ó®×¦U¦³¤£¦P
¥H¥»ÃD¬°¨Ò¡A­º¥ý¬O±N¸ê®Æ½d³ò¥H°}¦C«¬ºAŪ¨ú
ª½±µ¾a°O¾ÐÅéŪ¼g¡A·|¤ñ¤@®æ¤@®æªºÅª¼g§Ö«Ü¦h
¦b¨Ó¬O·í§A­n«ü©wÀx¦s®æ®É¡A­n¾¨¶q´î¤Öselectªº¨Ï¥Î
ª½±µ«ü©wÄæ¦C¦ì¤]·|¨Ï³t«×¥[§Ö
´î¤Ö¤£¥²­nªº´`Àô»P°Ê§@³£¬O¥[³tªº¤èªk
±z¥i¥H¦Û¤v¸Õ¸Õ¬Ý
  1. Sub Ex()
  2. Dim d As Object, d1 As Object, d2 As Object, Ar(), i&, A As Range, C As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. Set d1 = CreateObject("Scripting.Dictionary")
  5. Set d2 = CreateObject("Scripting.Dictionary")
  6. d2("¦Ò¥Í¸¹") = "©m¦W"
  7. Ar = Range([A1], [A65536].End(xlUp).Offset(, 3))
  8. For i = 2 To UBound(Ar, 1)
  9.    d(Ar(i, 1) & Ar(i, 3)) = IIf(Ar(i, 4) < 65, "C", IIf(Ar(i, 4) < 85, "B", "A"))
  10.    d1(Ar(i, 3)) = ""
  11.    d2("'" & Ar(i, 1)) = Ar(i, 2)
  12. Next
  13. [G:Q].ClearContents
  14. Application.ScreenUpdating = False
  15. [G1].Resize(d2.Count, 1) = Application.Transpose(d2.keys)
  16. [H1].Resize(d2.Count, 1) = Application.Transpose(d2.items)
  17. [I1].Resize(, d1.Count) = d1.keys
  18. For Each A In Range([I1], [I1].End(xlToRight))
  19.    For Each C In Range([G2], [G65536].End(xlUp))
  20.       Cells(C.Row, A.Column) = d(C & A)
  21.    Next
  22. Next
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 20# zeny
³o¨ÇÀx¦s®æ¤º®e³£Åܦ¨¤F¤é´Á
³o¬O§A¨Ï¥Îbbªº½t¬G
¦Û­q®æ¦¡§ï¦¨
[>=85]!A;[>=65]!B;C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD