|
#1
|
|||
|
|||
Excel Help
I need some help with web query, i am importing pages from Cyberhorse but having issues with formatting, here is a page from today.
http://formguide.cyberhorse.com.au/...=Coffs&raceno=5 When i import the page the formats for some of the Distance,track and going get all messed up, seams if the number of starts is over 10 it changes the format, i have tried a few things with no success so am after some help from more experienced with excel. |
#2
|
|||
|
|||
Shaun, if you email me your web query I can have have a quick look at it and see if I can spot any problems .. Fred
|
#3
|
|||
|
|||
Shaun,
Is this the info you are trying to extract? (stats from 1st runner Blinkin Easy) Quote:
My excel web queries are a bit rusty but vb2010 is pretty close: 1. extract Dis = "13:2-1-3" using Instr() 2. Career()=Split(Dis,":") giving Career(0)="13" & Career(1)="2-1-3" 3. Place()=split(Career(1),"-") so Place(0)="2" Place(1)="1" Place(2)="3" Is this what you are trying to do and having troubles when runs at distance > 9 , Good=31...etc? Probably need a little more info to give any further help cheers |
#4
|
|||
|
|||
The extraction is not the problem the problem is it wants to sometimes format the number as a date, even if i have the sheet formatted as text when i import the new sheet it just goes back.
|
#5
|
|||
|
|||
Aaaaaahhhh, now I understand - can you change the dashes to dots/periods or anything other than dashes so that excel does not recognise it as a date
cheers |
#6
|
|||
|
|||
I have found a solution to this problem thanks to a user on the Gruss forum, he uses some macros to change 10:1-2-0 to 10::1-2-0 the double :: confuses excel and stops it changing to a date format.
I will post the macro but i don't totally understand it but it works, there are 3 parts to the macro. The part in red in macro 3 is what he has added to my macro. Forgot to mention what ever he has done has changed the import time from 30 seconds a race to 5 seconds. Code:
Code:
Code:
Last edited by Shaun : 4th August 2011 at 11:41 PM. |
Thread Tools | Search this Thread |
Display Modes | |
|
|