
Hello guys, I have been trying to implement the DSUM function but failed to figure it out. I looked through the previous DSUM posts on here and still don’t understand. This is my problem:
- on I8:L9, i have to implement the
DSUMto calculate the “calculated quantity sold” for each item, ie Textbook, Novel,notepad and laptop. from A9-A16 - I am supposed to use these values on B20 – B23. I don’t know how to make sure i have multiple criteria for the
DSUMfunction. -
I tried this and it worked only for the first function: =DSUM(bookstore,J8,I8:I9)
-
This gave me the correct value only for Textbook, It summed up the quantities for textbook. What I want to do now is replicate it down so that it is the same for all the other elements.
Please help. thank you
With the setup you have then using this formula in B20 copied down will give the cumulative total of the categories
=DSUM(Bookstore,J$8,I$8:I9)so that will give the sum for Textbook only in B20 but then in B21 it will be the sum for Textbook and Novel combined….then in B22 Textbook, Novel and Notepad (A22 should be “Notepad” to match I11)
To get the sum for the item in question only you could subtract the previous values above, i.e. use this version in B20 copied down
=DSUM(Bookstore,J$8,I$8:I9)-SUM(B$19:B19)….but all things being equal I agree with user667489, except
SUMIFis usually preferable for a single condition, i.e. in B20 copied down=SUMIF(A$9:A$16,A20,D$9:D$16)