Written by Allen Wyatt (last updated August 16, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
Octavio has a worksheet that has a lot of named ranges in it. In one section of his worksheet he has a list of those names. In a formula that uses the DSUM function, Octavio wants to use different cells in this list to refer to the actual "database" that is used by the function. For instance, if "February11" is a named range and cell F12 contains the text "February11," Octavio wants to specify F12 as the first parameter in the DSUM function and have it get the actual range. When he tries the following, where Criteria is a named range for the summation criteria, he gets an error:
=DSUM(F12, "Profit", Criteria)
The solution to this is to use, instead of the actual cell address, the results of the INDIRECT function. This function grabs whatever is in the cell it references and uses that content as a "pointer" to another cell or range. Thus, if cell F12 contains the text "February11", the following two formulas provide the exact same result:
=DSUM(INDIRECT(F12), "Profit", Criteria) =DSUM(February11, "Profit", Criteria)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5664) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Indirect References to a DSUM Parameter.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Functions are at the heart of Excel's power in working with data. One of the most misunderstood functions provided by ...
Discover MoreWhen working with finances, you often need to know the rate of return on a given investment. The most common type of ...
Discover MoreThe IF worksheet function is very handy to make conditional evaluations. You are not limited to a single IF comparison, ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments