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

¤Wºô§ìªÑ²¼¸ê®Æ

¤Wºô§ìªÑ²¼¸ê®Æ

½Ð±Ð¦U¦ì¤j¤j:
¦³­ÓVBAµ{¦¡¸ê®Æ§ì¤£¤U¨Ó
½Ð¦U¦ì¤j¤jÀ°¦£¬d¬Ý­þ¸Ì¦³°ÝÃD
ÁÂÁÂ
Private Sub CommandButton1_Click()
Dim po As Integer        '«Å§iPO¬°¾ã¼Æ

lR = Range("A2").End(xlDown).Row
Rows(lR + 1 & ":400").Select       'aÄæªÅ¥Õ¥H¤U¥þ§R°£
Selection.Delete shift:=xlUp


LRA = Range("C2").End(xlDown).Row
For i = 3 To LRA
If Cells(i, 5) <> "" Then
ValueSno = "$A$" & i
Linkss = "URL;https://tw.stock.yahoo.com/q/q?s=" & Cells(i, 1)
        
po = lR - 5 + (7 * (i - 2)) '©w§ì¨ú¸ê®Æªí®æ°j°é
With ActiveSheet.QueryTables.Add(Connection:= _
Linkss, Destination:=Sheets("¤u§@ªí1").Range("b" & po))
      .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = "6"
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
        .Name = .ResultRange.Cells(3, 1)
    End With   
Range("A" & po + 2) = Cells(i, 1)
Cells(i, 2) = "=vlookup(" & Cells(i, 1) & ",$A$16:$0$200,2,0)"
Cells(i, 2) = Mid(Cells(i, 2), 5)
Cells(i, 7) = "=vlookup(" & Cells(i, 1) & ",$A$16:$0$200,4,0)"
End If
Next

End Sub
michael

¦^´_ 2# GBKEE
·PÁ¤j¤j©âªÅÀ°§Ú¬Ý
¦ý¬O¦n¹³¤]¨S¦³¿ìªk§ì¤U¸ê®Æ
ªþ­ÓÀ£ÁYÀɦA³Â·Ð¤j¤jÀ°§Ú¬Ý¤@¤U

ªÑ²¼.rar (12 KB)

michael

TOP

ª©¥D:
¤£³Ó·PÁª©¥D¤£Â_ªºÀ°§Ú­×§ï
¦ý¬O§Ú¥u§ì¤U²Ä¤@­ÓªÑ²¼´N¥d¦b
Cells(i, 2) = Mid(Cells(i, 2), 5)
¥¦Åã¥Ü
°õ¦æ¶¥¬q¿ù»~'13
«¬ºA¤£²Å
¯à§_½Ðª©¥D¦bÀ°§Ú¬Ý¤@¤U¨º¸ÌÁÙ¦³°ÝÃD
ÁÂÁÂ
michael

TOP

¦^´_ 9# c_c_lai

c_c_lai¤j¤j :
·PÁÂ¥X¤â«ü¾É
¦]¬O·s¤â­n®ø¤Æ»Ý­n¤@ÂI®É¶¡
¸g¹L­×§ï
²{¦b¶]°_¨Ó¥i¥H¤F
¦p¦³ÁÙ°ÝÃD
½Ð¤j¤jÀ°¦£
ÁÂÁ¦U¦ì¤j¤j
michael

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD