VBA scripting in Excel

G

Guest

I rarely if ever use Excel. I need to change the format of a row of data
from a Date field (data is imported incorrectly from an Oracle Database) to a
long integer.

Can I use VBA in Excel like we do in Access or SQL?

If I can a small example of how to go to the script when I open the
spreadsheet would be helpful.

Thanks in Advance!

Len
 
G

Guest

How are you getting the data into Excel?

Data | Import External Data + Import Data

normally understands the Date date type.

If you are using the CopyFromRecordset function, that too understands the
Date format.

ELSE:

1. Change the SQL to CAST the date columns as string

or, simply: select the columns in Excel, click Format | Cells | and then
choose Date or Custom and specify/select the format you want.
 
G

Guest

The data is coming in from the Teachers Association Credit Union. I have no
control on how the data is formatted.

I am using the TransferText in an Access Macro. It will not let me save it
in access with a CSV extension unless I use TransferText, but opens fine in
Excel.

The problem is that the column is not suppose to be a date formatted field,
but for some reason it comes accross that way.

Thanks Again

Len
 
G

Guest

Can this be done using VB Script? I know I can do it manually, but they want
it done via VBA if possible?

Thanks Again
 
N

NickHK

Len,
Record a macro whilst performing the manual steps.
Clean up the results.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top