+ Reply to Thread
Results 1 to 7 of 7

Simple Dsum Question

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Loughborough
    MS-Off Ver
    Excel 2010
    Posts
    4

    Simple Dsum Question

    I have a spreadsheet table with, say, a column for the salesperson, a column for products and a column with sales.

    I want to know - using dsum - total sales where the sales person is ("Smith" or "Jones") and product is ("apples" or "oranges")

    I assumed my criteria table would look like this:

    Salesperson....Product
    Smith...............Apples
    Jones...............Oranges

    But I find its only giving me sales where the salesperson is Smith and how many apples they sold, or the person is Jones and how many oranges they sold.

    How do I set up my criteria range so shows sales for both apples and oranges for Smith and Jones combined?

    I'm hoping you're not going to say I have to list each person twice with both apples and oranges against their name (ie 4 lines in total) - my actual spreadsheet contains far more possible combinations.

    with thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Simple Dsum Question

    Hi, Matt

    Why you not try pivot table?
    Click (*) if you received helpful response.

    Regards,
    David

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Simple Dsum Question

    With an pivot table.

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    02-26-2013
    Location
    Loughborough
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Simple Dsum Question

    Thanks for your help guys.

    However I was avoiding pivot tables for 2 reasons:

    1) The file has very dynamic data and is to be used by Excel novices (not necessary a deal breaker for pivot tables...)

    2) Because of the way the incoming data is formatted (I paste a range with titles into a template), the title of the column(s) to sum changes regularly (ie its not just "sales", it could be "orange sales" in one report, "apple sales" in the next, BOTH in the next one etc...) this would require someone to reconfigure the pivot table each time wouldn't it?

    This is why I was hoping to do it with Dsum (dsum would just use what ever column title it points at)

    Any suggestions?

    Thanks again

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Simple Dsum Question

    1) I don't find that a reason => learn users to work with pivot table.

    2) I suggest you have to change the criteria with the Dsum also (or am I wrong?)

    I'm not familiar with Dsum.

    so what is the differance with pivot table?

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Simple Dsum Question

    Hi Matt Akers

    Perhaps the Sumproduct formula.
    Column A = Names
    Column B = Fruit
    Column C = Sales
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  7. #7
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Simple Dsum Question

    See the attachment, may be this what you looking for
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1