View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
scubadiver scubadiver is offline
external usenet poster
 
Posts: 55
Default Using Excel and SQL


I have a list of postcodes in Excel and I want to use VBA to get information
from a table in SQL server which has almost 2million rows.

I would really like to know what code I need to use to get the required
records to match the postcodes.

Does that make sense?

"Joel" wrote:

There seems to be an error in you r lastt posting. Can't read the message.

"Joel" wrote:

The simpliest thig to do is to record a macro when performing the opration
manually.

1) Start Recording : Tools - Macro - Record New Macro
2) get data : Data - Import External Data - New Database Query. Browse for
the Server location and select the Table from the database.
3) Stop recording : Tools - Macro - Stop Recording.


You can get the macro by typing Alt-F11 from worksheet and looking in the
Modules portion of the Project window. the recorded macro can be manually
changed as required. If you need additional help post the recorded macro.



"scubadiver" wrote:

Hello,

I have a list of postcodes in Excel and I want to match them using an SQL
table from a warehouse server

I have been told that I can use VBA programming but what code do I use or
can I be pointed in the right direction?

cheers