- ©«¤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
|
¦^´_ 1# marklos
¸Õ¸Õ¬Ý- Option Explicit
- Option Base 1
- 'Option Base ³¯z¦¡ ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i°}¦C¯Á¤Þªº¹w³]¤U¡C
- '»yªk
- 'Option Base {0 | 1}
- 'AutoFilter ¤èªk [¦Û°Ê¿z¿ï] ¿z¿ï¥X¤@Ó²M³æ¡C¬° Variant
- Sub Ex()
- Dim Ar, Sh As Worksheet, i As Integer
- Ar = Array("V:", "I:")
- Sheets("Sheet1").UsedRange.Clear
- With Sheets("log")
- For i = 1 To UBound(Ar)
- .Range("a1").AutoFilter Field:=1, Criteria1:=Ar(i)
- .Columns(3).Copy Sheets("Sheet1").Cells(1, i)
- Next
- .Range("a1").AutoFilter
- End With
- Sheets("Sheet1").[a1].Resize(, UBound(Ar)) = Ar
- End Sub
- Sub Ex1() '¤£¥Î¿z¿ï½Æ»s
- Dim Ar, Ar1(), Ar2(), i As Integer, x As Integer, e As Range
- Ar = Array("V:", "I:")
- ReDim Ar1(UBound(Ar))
- With Sheets("log").Range("A:A")
- For i = 1 To UBound(Ar)
- .Replace Ar(i), "=100/0", xlWhole 'Replace ¤èªk
- '"V:" , "I:" ´À´«¬°¿ù»~È
- x = 0
- With .SpecialCells(xlCellTypeFormulas, xlErrors).Cells '¿ù»~ȪºÀx¦s®æ
- .Value = Ar(i) '¿ù»~ÈÁÙ쬰ªº"V:" , "I:"
- ReDim Ar2(.Cells.Count)
- For Each e In .Offset(, 2).Cells
- x = x + 1
- Ar2(x) = e
- Next
- Ar1(i) = Ar2
- End With
- Next
- End With
- With Sheets("Sheet1")
- .UsedRange.Clear
- For i = 1 To UBound(Ar)
- .Cells(i) = Ar(i)
- .Cells(i).Offset(1).Resize(UBound(Ar1(i))) = Application.Transpose(Ar1(i))
- Next
- End With
- End Sub
½Æ»s¥N½X |
|