+ Reply to Thread
Results 1 to 11 of 11

Inquire split database with pivot table

  1. #1
    Registered User
    Join Date
    01-13-2007
    Posts
    9

    Inquire split database with pivot table

    Hi
    I want to build a pivot table on database that is not centralize in one place.

    every month the new data is insert in a new sheet (of course with the
    same fields names)
    But the wizard, refuse to build a pivot table from data that is not
    concentrated in one place.
    (My intention is not the option: "Multiple Consolidation Ranges".)

    I have a feeling, that there is a way to circumvent this limitation.
    I appreciate a solution to the problem that a long time bother me.
    thank you.
    Barak

  2. #2
    Registered User
    Join Date
    03-08-2007
    Location
    Brisbane, Australia
    Posts
    57

    More info

    Hi Barak

    Can you provide any better description of the database and its location - is it in one Excel file, or on a LAN or WAN?? If it's not in Excel, what is the DBMS?

    Are you talking about getting data from several ranges (separate sheets?) and creating a Pivot Table form this??

    Feel free to post a small sample file if that would help to explain the problem.

    HTH
    James

  3. #3
    Registered User
    Join Date
    01-13-2007
    Posts
    9
    Hi James
    I am glad that you ready to help me.
    Yes, I am talking about getting data from several ranges (separate sheets) and creating a Pivot Table from this.
    I enclose a sample file as you suggest.
    Thank you
    Barak
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Barak

    The only way that I know you can do this with your current set-up is using Multiple consolidated ranges.

  5. #5
    Registered User
    Join Date
    01-13-2007
    Posts
    9
    Hi Norie
    Yes, I know that. But I need that the regular option of pivot table takes the data from several ranges, not the "Multiple consolidated ranges" option.
    Thank
    Barak

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Barak

    Well I'm sorry with your current set-up you just can't have it.

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Inquire split database with pivot table

    What your asking for can be done....but it's a bit tricky!

    We'll do this using MS Query

    First, open a new workbook

    <data><pivot table>....Check: External data...Click [Next]
    Click [Get Data]....Database: Excel files
    (Browse to your file...Click [OK])

    MSQuery will display your sheet names followed by Dollar Signs.
    (The $ tells MS Query to treat the sheet as a Table)

    Add Paris$ to the query.....Click [OK]
    Drag City, Client, Quantity to the query area
    Click [ ! ] to run the query.

    So far so good? (I hope)

    Now comes the fun part....
    Click the [SQL] button to view the SQL code.

    You'll see something like this:
    Please Login or Register  to view this content.
    Lets modify that SQL....
    1) Copy all of it an paste it into NOTEPAD
    2) Edit it to this:
    Please Login or Register  to view this content.
    3) Copy that SQL and paste it under itself 2 times
    4) Separate the 3 instance with this text:
    UNION ALL

    5) Now it looks like this:
    Please Login or Register  to view this content.
    6) Change the 2nd and 3rd sheet references to London$ and New York$:
    Please Login or Register  to view this content.
    7) Copy the new SQL into the SQL window (replacing the old SQL)
    8) Cross your fingers and click [OK]
    -You'll get a warning that the query can't be viewed in design mode
    (not a problem....Click [OK])

    If you see the data results....then all is well!
    Click the "door" button to return the data to Excel.

    Now that you're in the Pivot Table dialog again...
    Click [Layout]
    ROW:
    drag City here
    drag Client here
    DATA: drag Quantity here.
    COLUMN: (leave this area empty)
    Click [OK]....select where you want the Pivot Table and you're mostly done.

    If the Pivot Table looks ok....
    1) Open the "Pivot Table.xls" file
    2) Switch to the new workbook with your pivot table
    3) MOVE the pivot table sheet into the "Pivot Table.xls" file
    4) Done!

    Post back if you have any questions.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Ron

    I actually had a feeling you could go down that route, or something similar anyway, but the OP seemed to only want to use the standard options for creating a pivot table.

  9. #9
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Inquire split database with pivot table

    Quote Originally Posted by Norie
    Ron

    I actually had a feeling you could go down that route, or something similar
    anyway, but the OP seemed to only want to use the standard options for
    creating a pivot table.
    You could be right, but, Barak only mentioned not wanting to use Multiple
    Consolidaton Ranges (one of Pivot Table's weaker "features" IMHO) which
    couldn't do the job anyway.

    Obviously, there's no built-in, one-click method to consolidate the data in
    Excel. However, if it simply must be done...even if somewhat inelegantly
    ..we're left with the Three Little Pigs' Dilema: "Straw, Sticks, or Bricks"

    I used "Sticks"
    (Using MS Access would be one of the Bricks approaches.)

  10. #10
    Registered User
    Join Date
    01-13-2007
    Posts
    9
    Hi Ron
    This is exactly what I need, and I am very satisfied.
    This solution is working and It's a great pleasure.
    You wrote a detailed answer,
    Thank you for your time.
    barak

  11. #11
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Inquire split database with pivot table

    I'm glad that worked for you.....Thanks for letting us know!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1