- ©«¤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
|
¦^´_ 47# usana642
¸Õ¸Õ¬Ý- Option Explicit
- Sub Àx¦s¤ppµ²ªG()
- Dim Rng(1 To 4) As Range, AR(1 To 6), xi As Integer, e As Variant
- With Sheets("pºâ")
- Set Rng(1) = .Range("G1").End(xlDown) 'G1©¹¤U³Ì«á¦³¸ê®ÆªºÀx¦s®æ
- Set Rng(2) = .Range("E2", .[E2].End(xlDown)) '¶R½æÅv
- End With
- For Each e In Array("Call", "Put")
- Rng(2).Replace e, "=usana642" '¤½¦¡¤£¦s¦b ¶Ç¦^¿ù»~È
- With Rng(2).SpecialCells(xlCellTypeFormulas, xlErrors) '¦³¿ù»~ªºÀx¦s®æ
- With .Offset(, 2) '¥k²¾2Äæ
- xi = IIf(e = "Call", 0, 1)
- Set Rng(3) = .Find(Application.Max(.Cells)) '´M§ä³Ì¤jÈ
- AR(1 + xi) = Rng(3).Offset(, -3) '¼i¬ù»ù
- AR(3 + xi) = Rng(3).Offset(, -1) '³Ì«á¦¨¥æ»ù
- AR(5 + xi) = Rng(3) '¥¼¨R¾P«´¬ù¶q
- End With
- .Value = e
- End With
- Next
- With Sheets("¬ö¿ý").Cells(Rows.Count, "A").End(xlUp).Cells(2, 1)
- 'Cells(Rows.Count, "A").End(xlUp):AÄæ³Ì«á¦C©¹¤W¦³¸ê®ÆªºÀx¦s®æ.Cells(2, 1) :²Ä2¦C ,²Ä1Äæ
- .Value = Date
- .Cells(1, 2) = Rng(1)
- .Cells(1, 3).Resize(1, 4) = Rng(1).Cells(1, 4).Resize(1, 4).Value
- .Cells(1, 7).Resize(1, 6) = AR
- End With
- End Sub
½Æ»s¥N½X |
|