Thread
:
option to prevent Excel changing 1-2-3 to a date
View Single Post
#
10
Posted to microsoft.public.excel.misc
Nick Hodge
external usenet poster
Posts: 1,173
option to prevent Excel changing 1-2-3 to a date
Vince
Having looked at it, I would lobby the website to change from frames...It's
ugly!
Gord's answer won't work as the frame you want to extract data from is not
even recognised by Excel, I guess as it's buried in many others
I think your best bet is to put this code in your personal.xls and select
the cells and it will change them to the correct format.
Excel has it's failings, but you can get around the 'sniffing' of data types
in many ways, just not when it's buried in ugly frames.
Here is the code that should work (Select the cell first)
Sub changeDateToOdds()
Dim first As String
Dim second As String
Dim third As String
first = Day(ActiveCell.Text)
second = Month(ActiveCell.Value)
third = Val(Right(Year(ActiveCell.Value), 2))
ActiveCell.NumberFormat = "@"
ActiveCell.Value = CStr(first & "-" & second & "-" & third)
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS
"Vince" wrote in message
...
Gordon
To get the data that I copy and paste
go to the site
Click on Racing
Click on results & search
Pick a date eg 8 jul 2006 Racing click on RESULTS
Click on a race eg EAGLE FARM BR1
one line of data data includes 9-2-4 10-7-2
Click on EAGLE FARM BR6
data includes 8-10-13-5 8-10-13-11
Click on GOLD COAST QR1
data includes 10-1-3 "blank"
Sometimes the data is limited to 10-1
I will check out your suggestion later today. The Tennis is just
finished
and I must go to bed. just after 2am in Oz.
kind regards
--
Vince
"Vince" wrote:
--
Vince
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.
http://www.microsoft.com/office/comm...lic.excel.misc
Reply With Quote
Nick Hodge
View Public Profile
Find all posts by Nick Hodge