I believe your problem is that in the Access database,
the field that has the date is really set up as a TEXT field.
the values only LOOKS like a date.
When the data is exported to excel, Excel assumes that
if the column is a text format, then it'll display it as text.

I have several of these.

I doubt very much if you'll get the DB admin to change the field
type on the access database.

What *I* would do (and have done)
is record a macro that selects the entire column (or sheet!)
and replaces "-" with "-" (or "/" with "/").

like:

    Selection.Replace What:="-", Replacement:="-", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False

it'll force Excel to re-evaluate the cell contents.

Paul


________________________________
From: "manni...@nationwide.com" <manni...@nationwide.com>
To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com>
Sent: Fri, October 30, 2009 8:00:36 AM
Subject: $$Excel-Macros$$ excel does not recognize dates


I'm using a access macro to export access crosstab query results to
excel.  Everything works
great, except that the column names are dates that export to excel as
text.  Excel formulas do not recognize it as a date, and dependent
formulas result in errors.  Excel does not recognize them as a date
until I enter the cell by double clicking on it (going to
format>cells
doesn't help).  After exiting, the date appears in date format and
can
be recognized by excel formulas.  I've seen this many times before
and
have never found a work around other than entering and exiting the
individual cells.  I posted this on microsoft.public.access and didn't
find a solution.


--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to