Lists


Posted by Philip Edgington on January 14, 2002 9:27 AM

I have managed to construct a list by where you click on a Macro and it adds a price and name to the list. I would like to be able to add up the prices in this list. I can do this but when I add another price to the list the price stays the same. How do I allow it to add the price which has been added to the list.
Instructions on the solution for this would be valued thanks
Phil



Posted by Richard S on January 14, 2002 1:42 PM

If you are using a data form to add data to your list, you could name the list, and use the DSUM function. ie if you named your list "list", and use a data from to add data, the named range would expand as entries are added. If the heading for the price was in cell B1, and you entered Price in cell D1, and <>0, in D2 (criteria), the DSUM formula would be
=DSUM(list,B1,D1:D2)
This will return the sum of all Prices not equal to zero in the named range "list".
HTH
Richard