SQL SELECT to create a table from another table within Excel workbook

kwagner1

Active Member
Joined
Jun 10, 2003
Messages
445
Greetings,

i am using external connection to select a recordset into my Excel workbook (call it Table01). That is working fine.
My question is: from the original table that i created (Table01) i want to then execute another sql "select" statement from within Excel to query the first worksheet and create a new table (Table02). The new table is a smaller subset of the first one.

is this possible??
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi,

I think its possible.

Try this

1. name the source range (say MyRange)
2. save and close the file
3. open a new and empty file
4. Data>From other sources>Microsoft Query
5. choose Excel files OK
6. locate the file that contains the data, select it, OK
7. Use the arrow to transfer the named range (MyRange) to the right-panel Next
8. in the next window you can filter data or go ahead, Next, Next and pick the second option "View data or edit query in Microsoft Query"
9. Finish opens the Microsoft Query window where you can use SQL
10. After you have used Select...you can click in the icon with an open-door + an arrow to the left to transfer the selected data to Excel.

Good luck!

M.
 
Upvote 0

Forum statistics

Threads
1,215,582
Messages
6,125,660
Members
449,247
Latest member
wingedshoes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top