• Skip to main content
  • Skip to primary sidebar
  • Home
  • Blog
  • VBA Programming
  • Open-Libre Office
  • Web Stuff
  • Videos
    • VBA Articles
    • LibreOffice And Open Office
  • Excel VBA Glossary
  • About
  • Contact

what does excel dsum do

Dsum queries your Excel data and provides answers based on the criteria that you provide to the dsum function.
More to the point in order to use dsum you have to decide to layout your spreadsheet using best practice spreadsheet design principles.

Get the spreadsheet used in the tutorial above.

Also get updates when new blog or video tutorials are released.

Submitting…
In a nutshell that is data that is tabular with row headings and you do not mix up data and reports i.e. all report sheets are fed by data sheets like the one below and reports never ever link to other reports.
Figure 1
spreadsheet table for dsum The spreadsheet design above is perfect for a dsum function and is the way that I recommend that you lay out your data in general. I explain the excel dsum function in detail in the youtube video further down on this page.

Dsum Case Study

I want the total volume of shares traded on the NYSE only on Fridays for the ticker “bac” for the data set in the spreadsheet. This is perfect for a dsum function because dsum can behave like a complex autofilter or sql query.
Figure 2
dsum function with autofilter verification The dsum function in figure 2 is acting on the data in figure 1, this data has range name “StockData” and we are summing the “Volume” column using the criteria that has the range name “VolumeCriteria”. Notice that the top row of the criteria in figure 2 has column headers with the second row having the criteria in a “query by example” layout. I then verify (check digit) the result of the dsum by using a subtotal function.
=subtotal(9,G:G)
Subtotal column G (9 means use sum), This means that the function will only total the visible cells so that when you apply the autofilter the totals change to represent the filtered data.

Filed Under: Excel Tagged With: Excel Functions

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Free Training Videos

Make VBA Listbox Work as Database Grid

Image

Ulitmate Excel VBA Advanced Filter Tutorial

Click video and press f for full screen or watch on YouTube

Dynamically Link Images to LibreOffice Base Form

Click video and press f for full screen or watch on YouTube

Create Database with LibreOffice Base

Click video and press f for full screen or watch on YouTube

Create VBA Form In Excel

Click video and press f for full screen or watch on YouTube

Affiliate Disclamer

We hope you love the products we recommend! Just so you know, we may collect a share of sales or other compensation from the links on this page.
Thank you if you use our links, we really appreciate it!

Terms Of Service | Privacy Statement | Copyright © 2024 BusinessProgrammer.com.