How do I reference a “subset” or cells in an Excel Named Range?
-
12-09-2019 - |
Question
I have a named range in Excel (that was created do to making a Web Query in Excel)... how do I get the sum of just the "Amount" column?
Example: This works: =SUM(MyRange)
The problem is, that sums EVERY numeric looking field (so "Amount" and "UserID" are BOTH being included in the SUM function).
What I need is this: =SUM(MyRange["Amount"]) ... but I can't seem to find how to do something like that.
Thoughts?
Solution
Try this: The DSUM formula (Database SUM):
=DSUM(MyRange,"Amount",MyRange)
Basically, it's just summing the 'Amount' field in the database 'MyRange'.
Bill
OTHER TIPS
You could use the offset() function if you know where the Amount column is relative to the named range.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow