Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dan M. Hess
 
Posts: n/a
Default Multiple worksheets as the source for a pivot table

Can you use more than 1 worksheet as the source for a pivot table?
I saw where I could use multple consolidations, but I don't think
consolidation will work for me. I need to count records by month.
  #2   Report Post  
Posted to microsoft.public.excel.misc
steven1001
 
Posts: n/a
Default Multiple worksheets as the source for a pivot table


The following may be worth trying....
A spreadsheet called c:\JUNk\123.xls has a two worksheets 'march' and
'april' each with columns 'account', 'date' and 'value'

On a new worksheet in the same (or another) spreadsheet use Data
Import External Data New database Query, select 'Excel' files as the

data source. Find the spreadsheet called C:\JUNK\123.xls. Click on the
'SQL' button to display the sql code box. Enter the following....
SELECT `march$`.* FROM `C:\JUNK\123`.`march$` `march$`
union all
SELECT `april$`.* from `C:\JUNK\123`.`april$` `april$`

[may be easier to select the march worksheet into the query an click on
the " * " so all the correct file and worksheet addressing is set up for
you .. then edit the sql to the above format]

The data returned by the query will be all the rows in the March and
April worksheets combined into a single table that you can use as a
pivot table source.

For some reason unknown to me (using Excel 2003) a 'get external data'
can get the data from 2 other worksheets in the same open spreadsheet
but if you try to create a pivot table directly it will only let you do
it in another spreadsheet with the source spreadsheet closed.

regards


--
steven1001
------------------------------------------------------------------------
steven1001's Profile: http://www.excelforum.com/member.php...o&userid=30757
View this thread: http://www.excelforum.com/showthread...hreadid=538191

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
Pivot table format changes if value of source data is null Frustrated with formatting! Excel Discussion (Misc queries) 0 October 24th 05 02:16 AM
Multiple MS Access table sources for pivot table fbj Excel Discussion (Misc queries) 5 August 15th 05 04:41 PM
Field Source Error for Pivot Table JM Excel Worksheet Functions 1 July 29th 05 03:08 AM
Pivot table, dynamic data formula Excel GuRu Excel Discussion (Misc queries) 3 May 3rd 05 11:45 PM
Pivot table from multiple worksheets . . . possible? Spyder Excel Discussion (Misc queries) 1 March 3rd 05 08:24 PM


All times are GMT +1. The time now is 04:34 AM.

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"