- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 5# junkwei - Option Explicit
- Sub Ex()
- Dim Rng As Range, i As Integer, Ar()
- Set Rng = Range("iv1")
- '¶i¶¥¿z¿ï¥X"¯Z¯Å"Ä椣«½ÆªºÈ
- Range("a:a").AdvancedFilter xlFilterCopy, , Rng, True
- ReDim Ar(1 To 3, 1 To 1) '°}¦C«¸m
- Ar(1, 1) = "¯Z¯Å"
- Ar(2, 1) = "³Ì¤j¦~¬ö"
- Ar(3, 1) = "³Ì¤p¦~¬ö"
- i = 2
- Do While Rng.Cells(i) <> "" '"¯Z¯Å"Ä椣«½ÆªºÈ(¦U¯Z¯Å)
- With Range("a:a")
- .Replace Rng.Cells(i), "=EX", xlWhole '¦U¯Z¯Å´«¸m¬°¿ù»~È
- With .SpecialCells(xlCellTypeFormulas, xlErrors)
- ReDim Preserve Ar(1 To 3, 1 To i)
- Ar(1, i) = Rng.Cells(i)
- Ar(2, i) = Application.Max(.Cells.Offset(, 2))
- Ar(3, i) = Application.Min(.Cells.Offset(, 2))
- .Value = Rng.Cells(i) '¿ù»~È´«¸m¦^¬°¦U¯Z¯Å
- End With
- i = i + 1
- End With
- Loop
- Rng.EntireColumn.Clear '²M°£:¶i¶¥¿z¿ï¥X"¯Z¯Å"Ä椣«½ÆªºÈ
- Range("g1").Resize(UBound(Ar, 2), UBound(Ar, 1)) = Application.WorksheetFunction.Transpose(Ar)
- 'UBound(Ar, 2)°}¦C²Ä2ºûªº¤¸¯À¤WÈ
- 'UBound(Ar, 1)°}¦C²Ä1ºûªº¤¸¯À¤WÈ
- End Sub
½Æ»s¥N½X |
|