Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Indirect References to a DSUM Parameter.
by Allen Wyatt
(last updated February 2, 2019)
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 Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Indirect References to a DSUM Parameter.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Excel includes a handy function that allows you to repeat characters or strings of characters. How you use the REPT ...Discover More
If you need to determine the date of the last day in a month, it's hard to beat the flexibility of the EOMONTH function. ...Discover More
When working with text in a formula, you may need to extract the left-most characters from a string of text or from a ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.