copy paste from html to excel

rakic

New Member
Joined
Oct 11, 2002
Messages
5
Hi !

Usually results of Football (Soccer) matches are given like 3:1, 2:2, 0:1. See picture“ORIGINAL”
ORIGINAL
12. kolo GERMANY 1
Dan Cas R.b. 45' 90'
Sub 15:30 5201 Bayern M. Cottbus 1:1 3:1
Sub 15:30 5202 S Hannover Bochum 1:1 2:2
Sub 15:30 5203 S Hansa Dortmund 0:1 0:1
Sub 15:30 5204 S Hertha Hamburger 0:0 2:0
Sub 15:30 5205 S K'lautern München 1860 0:0 0:0



….When I want to copy these results and after that to paste them into EXCEL, they are changed. After the paste they become 3:01, 2:02, 0:01……… and so on.
See picture “RESULT OF PASTING IN EXCEL”
RESULT OF PASTING IN EXCEL
12. kolo GERMANY 1
Dan Cas R.b. 45' 90'
Sub 15:30 5201 Bayern M. Cottbus 1:01 3:01
Sub 15:30 5202 S Hannover Bochum 1:01 2:02
Sub 15:30 5203 S Hansa Dortmund 0:01 0:01
Sub 15:30 5204 S Hertha Hamburger 0:00 2:00
Sub 15:30 5205 S K'lautern München 1860 0:00 0:00


Is there a way to prevent this change of format to TIME.
The best thing would be to place result in two columns like :

Bayern M. Cottbus 3 1
Hannover Bochum 2 2
Hansa Dortmund 0 1
If it is possible.

Thank you in advance

DORDE
 
I tried recording a macro and got this answer back - well, I've modified it slightly to suit your post.

Hope this helps

Chris

URL = "URL;" & Range("A1").Value
SiteNameStart = InStr(1, URL, "www.")
SiteNameEnd = InStr(SiteNameStart, URL, ".co")
SiteName = Mid(URL, SiteNameStart, SiteNameEnd - SiteNameStart)

With ActiveSheet.QueryTables.Add(Connection:=URL, Destination:=Range("A1"))
.Name = SiteName
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

End Sub
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Answers are very interesant, but for last two from ChrisUK I feel a lack of knowledge. Finally I’ found a solution that satisfied me, and may be interest for reged. After opening a file in Internet Explorer, I am going to File – Edit with MICROSOFT FRONT PAGE, then make a replace with from “:” to “---“. With copy-paste transfer new version of file to EXCEL farther. By this way I loose any “Time formatting” and it may be, for other occasions bad thing of this method.

Dorde
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top