ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SQL query from one excel worksheer to another one in the same book (https://www.excelbanter.com/excel-programming/398758-sql-query-one-excel-worksheer-another-one-same-book.html)

Vicente

SQL query from one excel worksheer to another one in the same book
 
Hi,

I have an Excel book with 2 sheets. One of them is just a copy & paste
table from Access (I mean, just columns with a header). The other one
is a dynamic sheet that must be filled from the first sheet.

I need to fill it with several conditions, say I want all data from
column "user" but only if the user has "25" years. I was thinking
about using an SQL query to that worksheet, which is in the same book
as I pointed before, to get the data (and I canīt use Access).

Can I do that?

Thanks in advance.
Vicente.


Tim Williams

SQL query from one excel worksheer to another one in the same book
 
Yes?

Tim

"Vicente" wrote in message
ups.com...
Hi,

I have an Excel book with 2 sheets. One of them is just a copy & paste
table from Access (I mean, just columns with a header). The other one
is a dynamic sheet that must be filled from the first sheet.

I need to fill it with several conditions, say I want all data from
column "user" but only if the user has "25" years. I was thinking
about using an SQL query to that worksheet, which is in the same book
as I pointed before, to get the data (and I canīt use Access).

Can I do that?

Thanks in advance.
Vicente.



Tim Williams

SQL query from one excel worksheer to another one in the same book
 
http://www.microsoft.com/technet/scr.../tips0607.mspx

vbscript but you get the idea.

Tim

"Vicente" wrote in message
ups.com...
Hi,

I have an Excel book with 2 sheets. One of them is just a copy & paste
table from Access (I mean, just columns with a header). The other one
is a dynamic sheet that must be filled from the first sheet.

I need to fill it with several conditions, say I want all data from
column "user" but only if the user has "25" years. I was thinking
about using an SQL query to that worksheet, which is in the same book
as I pointed before, to get the data (and I canīt use Access).

Can I do that?

Thanks in advance.
Vicente.



joel

SQL query from one excel worksheer to another one in the same book
 
Not usre what you mean by "(and I canÂīt use Access)". I don't know if you
mean you don't how do to it in Access or is this a constraint that you want
your solution not to be one that uses access.

The best way do o this is to use a Record Macro (Tools Menu - Macro - Record
Macro). The perform the SQL query using the Data - Import External Data.
This will automatically generate a macro. Yo can then run the macro to make
sure it will run properly from excel (sometimes recorded macro need slight
modifications).

Once you have this macro, additional features can be added. You can post
these macros to get additional help.

If you don't wqnt to take the record macro approach and do your task just
with excel, then you need to post additional information at this sight to get
help which includes some sample columns and sheets that you need moved.

Look at other postings to get ideas. You can use the search feature at this
site to find similar requests.

"Vicente" wrote:

Hi,

I have an Excel book with 2 sheets. One of them is just a copy & paste
table from Access (I mean, just columns with a header). The other one
is a dynamic sheet that must be filled from the first sheet.

I need to fill it with several conditions, say I want all data from
column "user" but only if the user has "25" years. I was thinking
about using an SQL query to that worksheet, which is in the same book
as I pointed before, to get the data (and I canÂīt use Access).

Can I do that?

Thanks in advance.
Vicente.




All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com