Using DSUM() Function on Multiple Fields Using Arrays

Last reviewed: November 4, 1994
Article ID: Q60993

SUMMARY

This article discusses the use of array constants as the field parameter in the Microsoft Excel DSUM() function. To enter the =DSUM(database,field,criteria) function, do the following:

  1. Select the same number of cells as there are array constants entered in the field parameter of the DSUM() function. The sample DSUM() function below would have four cells selected.

  2. Enter the DSUM() function as shown below. If the selected cells from Step 1 go across a row, enter commas between the array constants for the field parameter. If the selected cells go down a column, enter semicolons between the array constants as shown in the example.

  3. To enter formula as an array function, press CTRL+SHIFT+ENTER.

The following is an example:

DSUM() Function

   =DSUM(Database,{"march","april","may","june"},Criteria)


Database

   name      march      april      may      june
   jon         4          3         2        1
   suzie       9          8         7        6
   steph       7          6         4        5
   jon         5          2         9        0


Criteria

   name      march      april      may      june
   ="=jon"


Results

              9          5          11       1


This method can also be used with any of the following Dfunction commands, by using array constants for the field parameter:

   DAVERAGE
   DCOUNT
   DCOUNTA
   DMAX
   DPRODUCT
   DSTDEV
   DSTDEVP
   DSUM
   DVAR
   DVARP


KBCategory: kbother
KBSubcategory:
Additional reference words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
3.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 4, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.