- ©«¤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
|
¦^´_ 26# usana642
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- With ActiveSheet
- .Cells.Clear
- With .QueryTables.Add("URL;http://www.taifex.com.tw/chinese/3/3_2_2.asp", ActiveSheet.[A1])
- .WebFormatting = xlWebFormattingNone
- .Refresh BackgroundQuery:=False
- ActiveSheet.Names(.Name).Delete
- End With
- .Range("E:G,I:L,N:Q").Delete '§R°£¦h¾lªºÄæ
- .Range("1:6,8:8").Delete '§R°£¦h¾lªº¦C
- .Range("B1").End(xlDown).Offset(1).Resize(2).EntireRow.Delete '§R°£¦h¾lªº¦C
- .Range("A:A").Insert '´¡¤J¤@Äæ
- .[B1].Resize(, 12) = Array("«´¬ù", "¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ»ù", "¥¼¥Ü¶q", "CALL", "=C2", "call-oi", "put-oi", "call-oi$", "put-oi$")
- '** "=C2" ¥iקאּ ¥¿½Tªº°Ñ·Ó ***
- With .Range("b2", .[b2].End(xlDown))
- .Offset(, -1) = "=rc4 +rc8 + rc9"
- .Columns(5).Replace "-", ""
- .Columns(7) = "=IF(rc[-3]=""Call"",1,0)" 'R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
- .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
- .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
- .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
- .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
- .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
- End With
- .UsedRange.Value = .UsedRange.Value '®ø°£¤½¦¡
- .Columns.AutoFit
- End With
- End Sub
½Æ»s¥N½X |
|