- ©«¤l
- 44
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 78
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- SP3
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- taipei
- µù¥U®É¶¡
- 2012-5-4
- ³Ì«áµn¿ý
- 2014-4-24
|
¦^´_ 30# GBKEE
GBKEE¤j¤j,§Úèè°õ¦æµ{¦¡,µo²{¤ppºâ¥Xªº¼Æȳ£¤£¥¿½T,½Ð°Ýnקïþ¸Ì?¤£¦n·N«ä¦A³Â·Ð±zÀ°¦£,ÁÂÁ±z- Option Explicit
- Private Sub §ó·s()
- 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
- 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],"""")"
- With .Cells(.Rows.Count + 1, 1) '.Rows.Count + 1 ½d³ò¤º¸ê®ÆÁ`¦C¼Æ+1
- .Cells(1, 0) = "¤pp"
- .Cells(1, 6) = Application.Sum(.Parent.Columns(6))
- .Cells(1, 9) = Application.Sum(.Parent.Columns(9))
- .Cells(1, 10) = Application.Sum(.Parent.Columns(10))
- .Cells(1, 11) = Application.Sum(.Parent.Columns(11))
- .Cells(1, 12) = Application.Sum(.Parent.Columns(12))
- End With
- End With
- End With
- End Sub
½Æ»s¥N½X |
|