Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Please help about SQL in Excel...

Dear Group...

How can I retrieve some data from Sheet2 to Sheet1 with SQL specific query ?

For example I have Col1 and Col2 in Sheet1 and want to display Col3 which is
column from sheet2 with specific condition (where, order by etc.etc.)?

How ?

Thanks

Boris


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Please help about SQL in Excel...

Hi

To create a query from Excel table (in same, or in other workbook), using MS
Query wizard:

a) create simple named range from your source data (headers included);
b) save the source workbook;
c) start MS Query wizard. The source workbook will be the datasource, and
named range(s) is/are table(s);
d) after you are asked for destination for result data, you can set the data
range properties - my advice is that you set old data to be written over,
and unused cvells to be cleared (not deleted).


But you have to consider, that returned data don't depend in any way from
data in other columns. Probably the better solution for your task are
worksheet functions (but to advice something more info is needed).


--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets



"Boris" wrote in message
...
Dear Group...

How can I retrieve some data from Sheet2 to Sheet1 with SQL specific query

?

For example I have Col1 and Col2 in Sheet1 and want to display Col3 which

is
column from sheet2 with specific condition (where, order by etc.etc.)?

How ?

Thanks

Boris




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Please help about SQL in Excel...

This file might be a help:
http://www.bygsoftware.com/examples/...SqlRequest.zip
It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

This workbook demonstrates how to get data direct from an MS Access table,
or from an open or closed MS Excel workbook using the workbook function
SQL.REQUEST.

Recently updated to show the use of SQL.REQUEST in the same workbook.

The code is open and commented.


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy


"Boris" wrote in message
...
Dear Group...

How can I retrieve some data from Sheet2 to Sheet1 with SQL specific query

?

For example I have Col1 and Col2 in Sheet1 and want to display Col3 which

is
column from sheet2 with specific condition (where, order by etc.etc.)?

How ?

Thanks

Boris




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"