Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Desperately seeking shorcuts
 
Posts: n/a
Default How do I combine lists in multiple worksheets

I have multiple lists on approx 30 worksheets, all in the same workbook.
They are all in the same format. Is there a way to combine the lists into
one list with out copying and pasting?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do I combine lists in multiple worksheets

You might be able to use MS Query to consolidate Excel ranges from your
multiple wkshts. This also works for consolidating data from the active
workbook (Just save it first so Excel can find it):

This example uses 24 named ranges in different sheets of one workbook.

Assumptions:
The data in each wkbk is structured like a table:
---Col headings (Dept, PartNum, Desc, Price)
---Columns are in the same order.

The data in each wkbk must be in named ranges.
---I used rngList01, rngList02, ...etc through rngList24

(Note: MS Query may display warnings about it's ability to show the query
....ignore them and proceed.)

Starting with an empty worksheet:
1)Select the cell where you want the consolidated data to start

2)DataImport External DataNew Database Query
Databases: Excel Files


Browse to The file, pick ONE of the data ranges to import.
---Accept defaults until the next step.

At The last screen select The View data/Edit The Query option.

Click the [SQL] button

Replace the displayed SQL code with an adapted version of this:

SELECT * FROM `C:\Queries\Lists`.rngList01
UNION ALL
SELECT * FROM `C:\Queries\Lists`.rngList02
UNION ALL
SELECT *FROM `C:\Queries\Lists`.rngList03
(continue like that until the last range)
UNION ALL
SELECT * FROM `C:\Queries\Lists`.rngList24

(Note: the apostrophes in the SQL code ( ` )are located on the same key as
the tilde (~) )

Click the button to return the data to Excel.

That will result in a continuous list of all of the records in every listed
range.

Once that is done....to get the latest data just click in the data range
then DataRefresh Data.
(You can edit the query at any time to add/remove data sources and/or fields.)


Is that an approach you can work with?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Desperately seeking shorcuts" wrote:

I have multiple lists on approx 30 worksheets, all in the same workbook.
They are all in the same format. Is there a way to combine the lists into
one list with out copying and pasting?

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Line chart from multiple worksheets Paul B. Charts and Charting in Excel 2 September 21st 05 11:46 PM
What is the quickest method to insert & name multiple worksheets . clyonesse Excel Worksheet Functions 8 September 20th 05 10:55 PM
Adding and Naming Multiple Worksheets Byron Excel Worksheet Functions 6 September 8th 05 02:52 AM
Functions across multiple worksheets starlight Excel Worksheet Functions 0 August 10th 05 05:10 PM
Update multiple worksheets Lizz45ie Excel Discussion (Misc queries) 0 May 31st 05 09:21 PM


All times are GMT +1. The time now is 11:48 PM.

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

About Us

"It's about Microsoft Excel"