Excel: Multiple Databases and Criteria in Database Functions

Last reviewed: November 30, 1994
Article ID: Q23700
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.0, 4.0, 5.0
  • Microsoft Excel for Windows, versions 2,x, 3.0, 4.0, 4.0a, 5.0

SUMMARY

You can specify more than one database and/or criteria for use with the database functions [DSUM(), DCOUNT(), and so on] in Microsoft Excel.

The database functions will accept any reference or named reference for the Database and Criteria parameters, allowing you to perform any number of analyses on any number of databases using any number of criteria.

(NOTE: If you are using Microsoft Excel version 1.5 or earlier, the database function, database, and criteria must all be located on the same worksheet.)

For example, enter one of the following:

   =DSUM(Database1,"field1",Criteria1)

   -or-

   =DCOUNT(MyData,"field2",Other)

"Database1" and "MyData" are ranges on the worksheet containing database information. "Criteria1" and "Other" are ranges on the worksheet containing criteria.

NOTE: The Data menu's Find, Extract, and Delete commands are valid only for the database and criteria defined using the Set Database and Set Criteria commands.


KBCategory: kbusage
KBSubcategory:

Additional words: 1.5 1.50 2.2 2.20 3.0 3.00 4.0 4.00 5.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.