Drop Down List

G

Guest

I have a drop down list that I'm using to sum up detail by specific customer.
The detail is kept on a worksheet called "Detail". The summary and drop down
list is on a worksheet called "Summary". When no customer is selected from
the list I want to be able to sum all customers. Then when a customer is
selected I only want it to sum that customer. How do I add this "All"
function to my worksheet? Here is an example of the formula I am using to sum
up detail by a customer and date. The cell "B3" is where my drop down list is.

=SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A8)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A8)),--(Detail!$B$2:$B$43998=Summary!$B$3))
 
G

Guest

Perhaps....

=IF(Summary!$B$3="All",SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A8)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A8)),--(Detail!$B$2:$B$43998)),SUMPRODUCT(--(MONTH(Detail!$I$2:$I$43998)=MONTH($A8)),--(YEAR(Detail!$I$2:$I$43998)=YEAR($A8)),--(Detail!$B$2:$B$43998=Summary!$B$3)))
 
G

Guest

That's what I was thinking but how will it know "All" means to sum all the
detail? In my formula it will be looking for a customer called "All", correct?
 
G

Guest

NO! If you check the first SUMPRODUCT, the compare to $B$3 had been removed
so it will sum based on Month and Year only.

This is what you want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top