ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] ¤j½L¨C¤ë¨C¤Ñ¾ú¥v¦¨¥æ¶q»Pª÷ÃB¤U¸ü

¦^´_ 30# GBKEE

¤w¥¿±`°õ¦æ
¯uªº«D±`·PÁÂGBKEE¤j¤jªº¼ö¤ßÀ°¦£,ÁÂÁ±z
stock

TOP

¦^´_ 30# GBKEE


GBKEE¤j¤j,§Ú­è­è°õ¦æµ{¦¡,µo²{¤p­pºâ¥Xªº¼Æ­È³£¤£¥¿½T,½Ð°Ý­n­×§ï­þ¸Ì?¤£¦n·N«ä¦A³Â·Ð±zÀ°¦£,ÁÂÁ±z
  1. Option Explicit
  2. Private Sub §ó·s()
  3.     With ActiveSheet
  4.         .Cells.Clear
  5.         With .QueryTables.Add("URL;http://www.taifex.com.tw/chinese/3/3_2_2.asp", ActiveSheet.[A1])
  6.             .WebFormatting = xlWebFormattingNone
  7.             .Refresh BackgroundQuery:=False
  8.             ActiveSheet.Names(.Name).Delete
  9.         End With
  10.         .Range("E:G,I:L,N:Q").Delete                                    '§R°£¦h¾lªºÄæ
  11.         .Range("1:6,8:8").Delete                                        '§R°£¦h¾lªº¦C
  12.         .Range("B1").End(xlDown).Offset(1).Resize(2).EntireRow.Delete   '§R°£¦h¾lªº¦C
  13.         .Range("A:A").Insert                                            '´¡¤J¤@Äæ
  14.         .[B1].Resize(, 12) = Array("«´¬ù", "¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ»ù", "¥¼¥­­Ü¶q", "CALL", "=C2", "call-oi", "put-oi", "call-oi$", "put-oi$")
  15.         '**  "=C2" ¥i­×§ï¬° ¥¿½Tªº°Ñ·Ó  ***
  16.         With .Range("b2", .[b2].End(xlDown))
  17.             .Offset(, -1) = "=rc4 +rc8 + rc9"
  18.             .Columns(5).Replace "-", ""
  19.             .Columns(7) = "=IF(rc[-3]=""Call"",1,0)"    'R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
  20.             .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
  21.             .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
  22.             .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
  23.             .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
  24.             .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
  25.         End With
  26.         .UsedRange.Value = .UsedRange.Value             '®ø°£¤½¦¡
  27.         .Columns.AutoFit
  28.         With .Range("b2", .[b2].End(xlDown))
  29.             .Offset(, -1) = "=rc4 +rc8 + rc9"
  30.             .Columns(5).Replace "-", ""
  31.             .Columns(7) = "=IF(rc[-3]=""Call"",1,0)"    'R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
  32.             .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
  33.             .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
  34.             .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
  35.             .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
  36.             .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
  37.              With .Cells(.Rows.Count + 1, 1) '.Rows.Count + 1 ½d³ò¤º¸ê®ÆÁ`¦C¼Æ+1
  38.                 .Cells(1, 0) = "¤p­p"
  39.                 .Cells(1, 6) = Application.Sum(.Parent.Columns(6))
  40.                 .Cells(1, 9) = Application.Sum(.Parent.Columns(9))
  41.                 .Cells(1, 10) = Application.Sum(.Parent.Columns(10))
  42.                 .Cells(1, 11) = Application.Sum(.Parent.Columns(11))
  43.                 .Cells(1, 12) = Application.Sum(.Parent.Columns(12))
  44.             End With
  45.         End With
  46.     End With
  47. End Sub
½Æ»s¥N½X
stock

TOP

¦^´_ 32# usana642
¤£¦n·N«ä¨S¸Ô²ÓÀˬd,§ó¥¿¦p¤U
  1. Option Explicit
  2. Private Sub §ó·s()
  3.     Dim Rng As Range
  4.     With ActiveSheet
  5.         .Cells.Clear
  6.         With .QueryTables.Add("URL;http://www.taifex.com.tw/chinese/3/3_2_2.asp", ActiveSheet.[A1])
  7.             .WebFormatting = xlWebFormattingNone
  8.             .Refresh BackgroundQuery:=False
  9.             ActiveSheet.Names(.Name).Delete
  10.         End With
  11.         .Range("E:G,I:L,N:Q").Delete                                    '§R°£¦h¾lªºÄæ
  12.         .Range("1:6,8:8").Delete                                        '§R°£¦h¾lªº¦C
  13.         .Range("B1").End(xlDown).Offset(1).Resize(2).EntireRow.Delete   '§R°£¦h¾lªº¦C
  14.         .Range("A:A").Insert                                            '´¡¤J¤@Äæ
  15.         .[B1].Resize(, 12) = Array("«´¬ù", "¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ»ù", "¥¼¥­­Ü¶q", "CALL", "=C2", "call-oi", "put-oi", "call-oi$", "put-oi$")
  16.         '**  "=C2" ¥i­×§ï¬° ¥¿½Tªº°Ñ·Ó  ***
  17.         With .Range("b2", .[b2].End(xlDown))
  18.             .Offset(, -1) = "=rc4 +rc8 + rc9"
  19.             .Columns(5).Replace "-", ""
  20.             .Columns(7) = "=IF(rc[-3]=""Call"",1,0)"    'R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
  21.             .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
  22.             .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
  23.             .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
  24.             .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
  25.             .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
  26.         End With
  27.         .UsedRange.Value = .UsedRange.Value             '®ø°£¤½¦¡
  28.         .Columns.AutoFit
  29.         Set Rng = .Range("b2", .[b2].End(xlDown))
  30.         With Rng
  31.             .Offset(, -1) = "=rc4 +rc8 + rc9"
  32.             .Columns(5).Replace "-", ""
  33.             .Columns(7) = "=IF(rc[-3]=""Call"",1,0)"    'R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
  34.             .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
  35.             .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
  36.             .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
  37.             .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
  38.             .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
  39.              With .Cells(.Rows.Count + 1, 1) '.Rows.Count + 1 ½d³ò¤º¸ê®ÆÁ`¦C¼Æ+1
  40.                 .Cells(1, 0) = "¤p­p"
  41.                 .Cells(1, 6) = Application.Sum(Rng.Columns(6))
  42.                 .Cells(1, 9) = Application.Sum(Rng.Columns(9))
  43.                 .Cells(1, 10) = Application.Sum(Rng.Columns(10))
  44.                 .Cells(1, 11) = Application.Sum(Rng.Columns(11))
  45.                 .Cells(1, 12) = Application.Sum(Rng.Columns(12))
  46.             End With
  47.         End With
  48.     End With
  49. End Sub
½Æ»s¥N½X

TOP

¦^´_ 33# GBKEE


    ÁÂÁÂGBKEE¤j¤jªº§Ö³t¦^À³,¥i¥H¥¿½Tºâ¥X¤p­p¤F,¦A¦¸·PÁ±zªº¼ö¤ß¨ó§U,¯¬±z¶g¥½´r§Ö...
stock

TOP

¦^´_ 30# GBKEE
¹ï¤£°_¡A½Ð±Ð±z "§Ö¨ú¹Ï®×®æ¦¡" ¥\¯àÄæ §Ú­n¦p¦ó¤~¯à§ä¨ì¡H
§Ú¬O 2010 ª©¡C¦]³o®×¨Ò³B²z©Î³\§Ú·|¸I¤W¡C

TOP

¦^´_ 35# c_c_lai
«ö¥kÁä

   
EX1.GIF
2012-10-20 07:51

TOP

¦^´_ 36# GBKEE
¯u©_¡A¨S¬Ý¨ìËç¡H
03.png
2012-10-20 08:09

¤S¡B¥H¤Uªº»yªk¹ê¦b¬O¦³¬Ý¨SÀ´¡A§Ú¤@ª½·Q¤F¸Ñ¥¦­Ì¥Nªíªº§t·N¡G
  1.             .Columns(7) = "=IF(rc[-3]=""Call"",1,0)"        ' R1C1ªí¥Üªk : ¤u§@ªí¤Wß}¤J¤½¦¡
  2.             .Columns(8) = "=IF(rc[-6]=r1c9,1,8)"
  3.             .Columns(9) = "=IF(rc[-2]=1,rc[-3],0)"
  4.             .Columns(10) = "=IF(rc[-3]=0,rc[-4],0)"
  5.             .Columns(11) = "=if(rc[-1]=0,rc[-6]*rc[-5],"""")"
  6.             .Columns(12) = "=if(rc[-2]<>0,rc[-7]*rc[-6],"""")"
½Æ»s¥N½X
§Ú±N =IF(rc[-3]=""Call"",1,0) ¶K¨ì¥ô¤@Äæ¦ì·QÆ[¹îµ²ªG¡A
µ²ªG¸ÓÄ檺­È«o¬O¾ã¬q =IF(rc[-3]=""Call"",1,0) ¤§¦r¦ê¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-10-20 08:50 ½s¿è

¦^´_ 37# c_c_lai
·|¬O¦b [¤j¤p¤Î¤º®e] ¤¤¶Ü?
FormulaR1C1 ÄÝ©Ê   ¶Ç¦^©Î³]©wª«¥óªº¤½¦¡¡A¥Î¥¨¶°»y¨¥ªº R1C1 ¼Ë¦¡²Å¸¹ªí¥Ü¡CRange ª«¥ó¬°Åª/¼g Variant¡ASeries ª«¥ó¬°Åª/¼g String¡C
°õ¦æ«á ¦p¹Ï ¤Ä¿ï R1C1  «Kª¾

EX1.GIF
2012-10-20 08:48
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i
  4.     For i = 1 To 5
  5.         [c5].Cells(1, i) = "=r" & i & "c" & i
  6.         [c5].Cells(2, i) = "=r[" & i & "]c[" & i & "]"
  7.         [c5].Cells(3, i) = "=r[-" & i & "]c[-" & i & "]"
  8.     Next
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 38# GBKEE
¹ïªº¡I
01.png
2012-10-20 09:04

R1C1 §Ú·|¦n¦n¦a¥hÁA¸Ñ¡AÁÂÁ±z¡I

TOP

¦^´_ 38# GBKEE
01.png
2012-10-20 09:53

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD