# Excel formula....

Posted by Danny on October 15, 2001 1:23 PM

Hi , hope you can answer my probably beginner question ...
I have two columns of info , the first a customer name and the second a dollar amount..
The customer name and different amounts may occur on numerous occasions in the same column...
I would like to write a formula that adds up all of the dollar amounts for each costomer and puts them in order from highest to lowest for chart purposes...
Hope this makes sense , probably not ..
Danny

Posted by Aladin Akyurek on October 15, 2001 1:34 PM

Danny,

Lets say that you have customers in A from A2 on and amounts in B2 from B2 on.

Create a list in C from C2 on that contains all your customers with no duplicates. You can do this by filtering or manually.

In D2 enter: =SUMIF(A2:A200,C2,B2:B100)

Select all the cells in C and D with data and sort on column D, then do the charting.

==========

Posted by IML on October 15, 2001 1:47 PM

Danny,
Only because you say you are a begginer, you may want to consider some non-formula solutions. For example, if you have "name" and "amount" as titles in the first row of you list you could do the following:
go to a blank cell and select consolidate from the data menu
Click in the refenence box that appears and highlight your list of name and amount.
Check both boxes in the "use labels in" box. Now hit okay. You could then sort and graph this that totals everything up.
Other methods are shown at
http://www.mrexcel.com/tip035.shtml

I know you specifically asked for a formula, so forgive me if this unwanted advice.