=DSUM(database,field,criteria)
=DSUM(A4:E10,"Profit",A1:A2)
The function returns the total profit from apple trees, which are in rows 5, 8, and 10 of the data range A4:E10. This function specifies that only the "Profit" column (column 5) is to be included in the calculation.
=DSUM(A4:E10,"Profit", A1:F3)
The function returns the total profit from apple trees with a height between 10 and 16 feet, and all rows 6, 8, and 9 of pear trees. This DSUM function uses the range A1:F3 to select the rows with the specified height and the "Profit" column (column 5) from the data range A4:E10.
=DSUM(A4:E10,"Cost", A1:A2)
The function returns the total cost from apple trees, which are in rows 5, 8, and 10 of the data range A4:E10. This DSUM function specifies that only the "Cost" column (column 4) is to be included in the calculation.
The DSUM function is a useful tool for quickly adding numbers from a list or database that meet specific criteria. It can be used on any worksheet and with multiple accounts.