Infinite opportunities?  Endless problems?  Limited resources?  Talk to us!
Operations
Consulting
Software
Consulting
Publishing and
Training
Applied
Solutions
Excel add-ins
and tutorials
Charts Excel and VBA
Case Studies
VBA
tutorials
PowerPoint
Add-Ins
Miscellenia
You are on the Home/Excel/Tutorials/RDBMS in Excel/Build Queries/Query 3 page

Building and using a relational database in Excel (with a little help from MS Query)

Building the queries

Query 3 -- A PivotTable cross-tabulation using data in the relational database

A cross-table of the number of accounts by customer city and account type

Now that we know how to link to MS Query, how to add tables to a query within MS Query, how to add fields to the query, and how to return data to Excel, we can expedite building this query.  Once in MS Query add all three tables to the query, link them, and add the City and Account Description fields to the query result. 

Back in Excel, create the PivotTable with City as the Row Field, Account Description as the Column field, and reusing Account Description as the Data Field.  To change the default name that Excel uses (Count of Account Description), double click on it and in the resulting dialog box enter a more appropriate name.

The result:

 

About this site

What's new

Google
Web
This Site
 

 

 

 

 

For custom technology solutions, operations consulting, or training contact web-underscore-contact@tushar-hyphen-mehta-dot-cee-oh-em.
By accessing any page or link on this web site other than this page, you agree to the terms and conditions.

Ads from amazon.com

[Optional] Survey (current rating of site: 3.7 out of 4)  If you will take a moment to provide your comments, it will help improve the site both for you, and for other visitors.

On a scale of 4 (just what I need)
to zero (totally useless)

How do you rate the information

on this page?

  on this site?

[Optional]

Your name
Your email address
Other comments
 
Monitor page
for changes
    
   it's private  

by ChangeDetection
A comment selected at random:

 

 

Copyright © 2000-2008 Tushar Mehta.
Send comments and suggestions about the web site to webmaster@tushar-hyphen-mehta-dot-cee-oh-em
Last edited April 13, 2008