VBA SQL import from Excel number format
Hi, I am creating an SQL Recordset of a data table from an external Excel spreadsheet. I am importing this into another spreadsheet using WHERE and ORDER filters...no problems there. The first column of my import contains only integers, when I try a simple VLOOKUP or MATCH Excel command on this first column I get #N/A because the imported data is not in number format.
The code Im using to dump the record set to the worksheet is as follows:
rsData.Filter = "Status LIKE 'Open'"
ActiveSheet.Range("A2").CopyFromRecordset rsData
I need guidance on massaging the first column only of the recordset (field?) to force it to an integer or number format so any subsequent operations in Excel using lookups on those numbers will not return an error.
Any thoughts?
MJ
|