The 3 Arguments in an Excel Database Function - dummies

The 3 Arguments in an Excel Database Function

By Ken Bluttman

The Excel database functions all work in basically the same way. They perform some calculation on a specified field for those records that meet specified criteria. For example, you can use a database function to calculate the average final grade for all students in Accounting 101.

All database functions use the following three arguments:

  • The database range: This argument tells the function where the database is. You enter it by using cell addresses (for example, A1:D200) or a named range (for example, Students). The range must include all records, including the top row of field names.

  • The field: You must tell a database function which field to operate on. You can’t expect it to figure this out by itself! You can enter either the column number or the field name. A column number, if used, is the number of the column offset from the first column of the database area. In other words, if a database starts in Column C, and the field is in Column E, the column number is 3, not 5. If a heading is used, put it inside a set of double quotation marks. Database functions calculate a result based on the values in this field. Just how many values are used depends on the third argument: the criteria.

  • The criteria: This tells the function where the criteria are located; it is not the criteria per se. The criteria tell the function which records to use in its calculation. You set up the criteria in a separate part of the worksheet, apart from the database area. This area’s address is passed to the database function.