osknows, maybe you could help me out with a similar problem as i am not sure what you are explaining.
I am importing this webpage   
http://formguide.cyberhorse.com.au/inde ... d&raceno=8
Now where it has stats like Track 8:1-2-0 somtimes the formating is just numbers even if i change it ti text when i import a bew page they get changed again.
It dose not change them all just some mainly if the first set of numbers is above 10.
Can you give me an example of how to fix this, i will provide my macro for the import.
- Code: Select all
- Sub Form()
 Sheets("Form").Select
 Sheets("Form").Range("B1:J1000").Select
 Selection.ClearContents
 Columns("B:J").Select
 Selection.NumberFormat = "@"
 With Sheets("Form").QueryTables.Add(Connection:= _
 "URL;" & Sheets("Data").Range("A1"), Destination:=Sheets("Form").Range("$B$1"))
 .FieldNames = True
 .RowNumbers = False
 .FillAdjacentFormulas = False
 .PreserveFormatting = True
 .RefreshOnFileOpen = False
 .BackgroundQuery = True
 .RefreshStyle = xlOverwriteCells
 .SavePassword = False
 .SaveData = True
 .AdjustColumnWidth = True
 .RefreshPeriod = 0
 .WebFormatting = xlWebFormattingNone
 .WebPreFormattedTextToColumns = False
 .WebConsecutiveDelimitersAsOne = True
 .WebSingleBlockTextImport = False
 .WebDisableDateRecognition = True
 .WebDisableRedirections = False
 .Refresh BackgroundQuery:=False
 End With
 Columns("B:J").Select
 Selection.Copy
 Application.DisplayAlerts = False
 Sheets("Data").Select
 Range("AA1").Select
 Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
 :=False, Transpose:=False
 Columns("AA:AA").Select
 Application.CutCopyMode = False
 Selection.TextToColumns Destination:=Range("AA1"), DataType:=xlDelimited, _
 TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
 Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
 :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
 Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _
 ), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1)), _
 TrailingMinusNumbers:=True
 Columns("AC:AC").Select
 Selection.TextToColumns Destination:=Range("AC1"), DataType:=xlDelimited, _
 TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
 Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
 :=Array(1, 5), TrailingMinusNumbers:=True
 Application.DisplayAlerts = True
 Range("A1").Select
 
 End Sub
 
The macro does a few other things but i need to get this fixed as it is part of an automated ratings program i use.