- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-11-18 16:50 ½s¿è
¦^´_ 15# 518587
°Ñ¦Ò¤@¤U,¿ï¤â©m¦W,¦~ÄÖ,¨°ª,Åé«.¥i¦Û¤v¼g¼g¬Ý
- Option Explicit
- Sub Ex()
- Dim n As Integer, myrng As Range, mySh As Worksheet, myAr
- '±qºô¶Â^¨ú¸ê®Æ
- For n = 1 To 2
- With Sheets("Â^¨ú¸ê®Æ")
- If .QueryTables.Count >= 1 Then .QueryTables("Novak-Djokovic_1").Delete '¤Ó¦hªºQueryTable ª«¥ó·|¦û¥Î¸ê·½
- .UsedRange.ClearContents
- Set myrng = Sheets("¿ï¤âºô§}").Cells(n + 1, 1)
- Set mySh = Sheets("¸ê®Æ·J¾ã")
- With .QueryTables.Add(Connection:="URL;" & myrng.Text, Destination:=.Range("$A$1"))
- .Name = "Novak-Djokovic_1"
- .FieldNames = True
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = xlInsertDeleteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .WebSelectionType = xlEntirePage
- .WebFormatting = xlWebFormattingNone
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
- Set myrng = .Cells.Find("W-L", Lookat:=xlWhole) '´M§ä"W-L"
- If Not myrng Is Nothing Then
- With .Cells(myrng.Row, "A")
- Select Case myrng.Column
- Case 3 '"W-L" ¦bCÄæ
- myAr = Array("", "", "", .Range("B3"), .Range("D2"), .Range("B4"), .Range("F2"), "", "", .Range("B6"), .Range("D5"), .Range("B7"))
- '³æ¥´±Æ¦W(W-L):.Range("D2") -> 2014/3/6 ³o"(¬O3³Ó6±Ñ)"¦b¦ó³B?
- Case 4 '"W-L" ¦bDÄæ
- myAr = Array(.Range("B3"), .Range("D2"), .Range("F6"), .Range("B5"), .Range("D4"), .Range("B6"), .Range("F4"), .Range("B8"), .Range("F7"), .Range("B10"), .Range("D9"), .Range("B11"))
- 'Âù¥´±Æ¦W(W-L): .Range("D9") ->2014/6/27 ³o"(¬O6³Ó27±Ñ)"¦b¦ó³B?
- End Select
- End With
- With Sheets("¸ê®Æ·J¾ã").Cells(n + 1, "I").Resize(, UBound(myAr) + 1)
- .Value = myAr
- .Cells(IIf(myrng.Column = 4, 11, 5)).NumberFormatLocal = "yyyy/m/d"
-
- End With
- End If
- End With
- Next n
- ActiveWorkbook.Save
- MsgBox "³B²z§¹²¦!"
- End Sub
½Æ»s¥N½X |
|