Microsoft KB Archive/45075

-

{| 2.x 3.00 4.00 4.00a 5.00 | 2.20 2.21 3.00 WINDOWS                 | OS/2 kbusage The information in this article applies to:
 * width="100%"|


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
 * Microsoft Excel for OS/2, versions 2.2, 2.21, and 3.0

SUMMARY
This article discusses using an array constant with the =DSUM function, passing multiple fields, and calculating the =DSUM of two different columns.

MORE INFORMATION
The database functions require three parameters: database, field, and criteria. All three of these are required. For the database and criteria parameters, use the references data type; for the field parameter, you must pass text. With the array constant, you can send text as a constant.

To enter a =DSUM formula, do the following:

 Select a column of cells with the same number of cells as the number of values in your array constant.  Enter the formula, as shown in the following example: =DSUM(database,{&quot;fieldname1&quot;;&quot;fieldname2&quot;...},criteria) substituting fieldname1, fieldname2, etc. with the desired fieldnames in your database,  Press CTRL+SHIFT+ENTER to enter the formula as an array.

In this example, be sure to use a semicolon in the array constant. The semicolon tells Excel to return the values down a column. If you wish to return the results to a row of cells, replace the semicolons with commas.
 * }

-

Last reviewed: November 4, 1994

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.