Excel imports a soccer score as a date...


Posted by Anthos on October 03, 2001 1:23 AM

I try to import a table with scores. When I import the file (html) the score line reads as 2-Feb instead of 2-2. Any hints appreciated.

Posted by Dank on October 03, 2001 2:30 AM

Are you importing the table from the internet? If so, which site and I should be able to help.

Regards,
Dan.

Posted by Anthos on October 04, 2001 2:53 AM

Thanks Dan,

The table is created by a soccer stats prog. The problem is that I cannot format the cell after the importing because excel gives its own value to dates.

Posted by Dank on October 04, 2001 3:52 AM

Hmmm, see what you mean. I just created a simple HTML table with teams, date played and results and no matter what I tried I couldn't get it to import properly. However, how about letting Excel think it's a date and using a formula like this:-


=IF(ISERROR(DAY(D2)&"-"&MONTH(D2)),D2,(DAY(D2)&"-"&MONTH(D2)))

The ISERROR bit is just in case the score imported (say 32-13) can't be represented as a date.

I hope it helps,
Dan.



Posted by Anthos on October 05, 2001 1:55 AM

You're great Dan, both in excel knowledge and character. It worked fine! Thanks a lot.

Anthos