Hi, Is it possible to create pivot table with multiple sheets? i have a huge data with as much as 2000000 rows and want to summarize it with help of pivt table. pls help me out.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
pivot table (xp professional)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » pivot table (xp professional)
- This topic has 34 replies, 5 voices, and was last updated 15 years, 10 months ago.
Viewing 1 reply threadAuthorReplies-
WSsdckapr
AskWoody Lounger -
WSrory
AskWoody Lounger -
WSindro
AskWoody Lounger -
WSrory
AskWoody Lounger
-
-
WSprasad
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 30, 2008 at 9:21 am #1110944You wrote that you have as much as 2 million rows. In Excel 2002 (XP) you’d need more than 30 sheets to store the data, not 6. That doesn’t seem very practical. You should move the data into a single table in a database such as Microsoft Access or SQL Server.
(Just as an illustration, I have attached your workbook with a pivot table based on multiple ranges. See Excel — Pivot Tables — Multiple Consolidation Ranges for a step-by-step description.)
-
WSprasad
AskWoody Lounger -
WSrory
AskWoody Lounger -
WSprasad
AskWoody Lounger -
WSrory
AskWoody LoungerMay 30, 2008 at 2:04 pm #1110959My point was that looking at your sample seems to imply that you want to end up with one long list from all the raw data sheets – i.e. you want one line in the pivot table for each line in the raw data. If so, you will run out of rows. If not, can you clarify what the groupings are and whether you just want a straight sum of each of the values.
-
WSprasad
AskWoody LoungerMay 31, 2008 at 5:59 am #1111044Actually, the data consisting sale of a particular product to different customers in a particular period and requirement is to get detail of one or all customer for whole period in given format. I am doing this with macros,which is very complexd and time taking also. Moreover, it is required to record macro each time a new customer added. The only problem is volume of data. Is there any simple way to do it?
-
WSsdckapr
AskWoody LoungerMay 31, 2008 at 1:39 pm #1111052It sounds like you want to use a system that is able to handle the larger datasets directly. This suggests to me something more like Access (even if you had XL2007s larger worksheet size)….
If you must keep it in excel in multiple sheets and want to extract some summary sheet, you will have to be specific about what you want the macro to do if you are asking for help in macro writing.
But has been pointed out, if you want to display all the customers in one sheet with details, you will come upon the sheet limitations in XL pre-2007
Steve
-
WSprasad
AskWoody Lounger -
WSprasad
AskWoody LoungerJune 30, 2009 at 11:54 pm #1167171Hi Steve, This is what I need exactly. can u write some simple macro to perform task?
I am not sure whether I should re-open the topic but since it remain un-resolved(so far i am concerned), I take this liberty to do this. It took me almost a year or so (ofcourse I set the issue aside in between) to discover how to consolidate the multiple sheets in a single pivot table. Quote from the link provided by rory:
“It can be done entirely within Excel. Go via menu data, import external data, new database query. Excel files. OK. Select your file. If you don’t have defined names for the data the first time using the software you get a message about no named ranges found, OK past this and when you see options hit “system tables”. This corresponds to worksheets in Excel. Select one worksheet (fields you want) and proceed until you get the option to go to MS Query. Then in MS Query hit the SQL button and amend the text from something like
Code:
SELECT field names
FROM source
to
Code:
SELECT field names
FROM source
UNION ALL
SELECT field names
FROM source_2
and continue to add for each additional table “UNION ALL SELECT field names FROM source_n”After finishing the SQL hit the open door button (or use the file menu) to end MS Query and then take the pivot table option at the next dialog box.”
I have tested it with as much as 10 sheets having 30K Rows X 8Col each and its amazing.
Yes, it can be done
P.S. : This was my first post and reason alone to join the lounge.
-
WSprasad
AskWoody LoungerJuly 3, 2009 at 3:22 am #1167446I am not sure whether I should re-open the topic but since it remain un-resolved(so far i am concerned), I take this liberty to do this. It took me almost a year or so (ofcourse I set the issue aside in between) to discover how to consolidate the multiple sheets in a single pivot table. Quote from the link provided by rory:
“It can be done entirely within Excel. Go via menu data, import external data, new database query. Excel files. OK. Select your file. If you don’t have defined names for the data the first time using the software you get a message about no named ranges found, OK past this and when you see options hit “system tables”. This corresponds to worksheets in Excel. Select one worksheet (fields you want) and proceed until you get the option to go to MS Query. Then in MS Query hit the SQL button and amend the text from something like
Code:
SELECT field names
FROM source
to
Code:
SELECT field names
FROM source
UNION ALL
SELECT field names
FROM source_2
and continue to add for each additional table “UNION ALL SELECT field names FROM source_n”After finishing the SQL hit the open door button (or use the file menu) to end MS Query and then take the pivot table option at the next dialog box.”
I have tested it with as much as 10 sheets having 30K Rows X 8Col each and its amazing.
Yes, it can be done
P.S. : This was my first post and reason alone to join the lounge.
Stuck…..
When i am adding new data source in edit query, displays a message ” file name is not valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long””.
Any idea????
-
WSsdckapr
AskWoody LoungerJuly 3, 2009 at 4:53 am #1167449Stuck…..
When i am adding new data source in edit query, displays a message ” file name is not valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long””.
Any idea????
Maybe I am stating the obvious, but it seems to me the message is indicating that the filename you are entering is invalid. Have you made sure that the name does not include invalid characters or punctuation and that it is not too long?
-
WSprasad
AskWoody LoungerJuly 3, 2009 at 5:14 am #1167452Maybe I am stating the obvious, but it seems to me the message is indicating that the filename you are entering is invalid. Have you made sure that the name does not include invalid characters or punctuation and that it is not too long?
Sure Steve, Name of first file is “Inv 300608” for which query is already set with desired results. I am trying to incorporate another file named “Inv 300908”. Earlier I have made a pivot table with 4 different files named “Inv 300607″,”Inv 300907″,”Inv 311207”, “Inv 310308”, sucessfully . I dont think there is anything wrong with name.
-
WSsdckapr
AskWoody LoungerJuly 3, 2009 at 6:06 am #1167454Sure Steve, Name of first file is “Inv 300608” for which query is already set with desired results. I am trying to incorporate another file named “Inv 300908”. Earlier I have made a pivot table with 4 different files named “Inv 300607″,”Inv 300907″,”Inv 311207”, “Inv 310308”, sucessfully . I dont think there is anything wrong with name.
But while you do not, it seems that Excel does. If you can do it with other names and only this causes the problem, it still seems to me that something is wrong with that name or the file with that name…
Steve
-
WSprasad
AskWoody LoungerJuly 3, 2009 at 6:27 am #1167455But while you do not, it seems that Excel does. If you can do it with other names and only this causes the problem, it still seems to me that something is wrong with that name or the file with that name…
Steve
I have already done the exercise to do it with different names without any success. I have changed the name of wb as weel as ws, but no results. What next???
-
WSprasad
AskWoody Lounger -
WSsdckapr
AskWoody Lounger -
WSprasad
AskWoody LoungerJuly 3, 2009 at 11:31 pm #1167552Try removing the “$” in the name…
Steve
No use of removing as excel put “$” in name by default and removing this cause invalid file name. I am not able to recognize the problem as it is doing well with other files with similar names /formats.
It is still worthwhile to use the function to consolidate multiple sheets to create pivot table irrespective of the fact that I am facing a problem like this.
-
WSHansV
AskWoody Lounger -
WSprasad
AskWoody Lounger -
WSHansV
AskWoody LoungerJuly 4, 2009 at 7:11 am #1167586The SQL statement in your screenshot will only work if the sheets are in the same workbook. If the sheets are in different workbooks, you have to provide the path and filename of each workbook:
SELECT …
FROM `C:ExcelBook1.xls`.`inv_3000608$` `inv_300608$`
UNION ALL
SELECT …
FROM `C:ExcelBook2.xls`.`inv_3000908$` `inv_300908$` -
WSprasad
AskWoody LoungerJuly 4, 2009 at 7:45 am #1167592The SQL statement in your screenshot will only work if the sheets are in the same workbook. If the sheets are in different workbooks, you have to provide the path and filename of each workbook:
SELECT …
FROM `C:ExcelBook1.xls`.`inv_3000608$` `inv_300608$`
UNION ALL
SELECT …
FROM `C:ExcelBook2.xls`.`inv_3000908$` `inv_300908$`is there a way to make excel understand to select entire path by default, as it select the file name only regardless to open/close wb?
-
WSHansV
AskWoody Lounger -
WSprasad
AskWoody Lounger -
WSHansV
AskWoody LoungerJuly 4, 2009 at 8:51 am #1167595You have already posted several attachments, so what is the problem?
You can use the PrintScreen key to place a copy of the screen on the clipboard.
Paste into Paint, then use the Paint tools to create an image that contains only the relevant part.
Save as a .jpg or .png file.Or attach a workbook with the relevant information.
See Adding Or Removing Attachments To/From A Post in our FAQ.
-
WSprasad
AskWoody LoungerJuly 6, 2009 at 1:00 am #1167752While setting query, it looks like this :
File used as database in closed and browse the same through dialogue box.
On editing the query, instead of displaying entire path, it displayes file name only.
I just want to know whether i should insert the path manually on editing or excel can pick it automatically?
-
WSHansV
AskWoody Lounger -
WSprasad
AskWoody Lounger -
WSHansV
AskWoody LoungerJuly 6, 2009 at 7:33 am #1167772You’ll have to use something like
Code:SELECT `inv_300608$`.`Inv-No`, `inv_300608$`.`Inv-Date`, ... FROM `E:PrasadSales TaxNMPLReturnAnnual Return8-09Inv-wise SalesQ1`.`inv_300608$` `inv_300608$`
Note:
– The consistent use of `
– The path and filename are specified only once.
– The extension .xls is omitted. -
WSprasad
AskWoody LoungerJuly 6, 2009 at 8:10 am #1167776You’ll have to use something like
Code:SELECT `inv_300608$`.`Inv-No`, `inv_300608$`.`Inv-Date`, ... FROM `E:PrasadSales TaxNMPLReturnAnnual Return8-09Inv-wise SalesQ1`.`inv_300608$` `inv_300608$`
Note:
– The consistent use of `
– The path and filename are specified only once.
– The extension .xls is omitted.Thanks Hans, very well doing with desired results.
-
-
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 7 ISO /Windows 10 ISO
by
ECWS
1 hour, 1 minute ago -
No HP software folders
by
fpefpe
8 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
1 minute ago -
Stay connected anywhere
by
Peter Deegan
5 hours, 31 minutes ago -
Copilot, under the table
by
Will Fastie
2 hours, 45 minutes ago -
The Windows experience
by
Will Fastie
11 hours, 45 minutes ago -
A tale of two operating systems
by
Susan Bradley
2 hours, 41 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
17 hours, 5 minutes ago -
Where’s the cache today?
by
Up2you2
1 day, 8 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 1 hour ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
1 hour, 31 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 9 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 1 hour ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 1 hour ago -
regarding april update and may update
by
heybengbeng
2 days, 3 hours ago -
MS Passkey
by
pmruzicka
1 day, 5 hours ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 10 hours ago -
*Some settings are managed by your organization
by
rlowe44
1 day, 21 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 9 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 5 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
3 days, 14 hours ago -
AI slop
by
Susan Bradley
1 day, 8 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
3 days, 15 hours ago -
Two blank icons
by
CR2
1 day ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 1 hour ago -
End of 10
by
Alex5723
4 days, 3 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
3 days, 1 hour ago -
test post
by
gtd12345
4 days, 9 hours ago -
Privacy and the Real ID
by
Susan Bradley
3 days, 23 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
2 days, 1 hour ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.