0

I've got a large table that looks like this:

Customer...P #...$ Charge

Cust1.........P01...Money1
Cust1.........P01...Money2
Cust1.........P01...Money3
Cust1.........P02...Money4
Cust2.........P03...Money5
Cust2.........P03...Money6
Cust2.........P04...Money4
Cust3.........P05...Money2

Each Customer may have multiple P#'s, and every P# has an independent dollar amount (there is a lot of data, so some $'s in the entire column may match, notice Cust3 was charged the same as Cust1 was on one instance).

I need to add together all of the matching P#'s and display them next to the most bottom one. For example, Money1+Money2+Money3 would all be added and displayed to the right of Money3 because P01 is true. This table, as it is, would produce 5 sums, each on the last line with the matching P#'s.

I've got 8,000 lines, hundreds of customers, thousands of P#'s, and I need to determine how much each was billed per their P#'s.

Essentially, I am consolidating the data. At the end of it, there will only be 1 instance of each P# displaying the total Money charged.

Thanks for your help, I hope this is possible!

4

1 回答 1

2

好吧,我认为一个简单的解决方案是使用数据透视表并将其P用作行标签,$并将值用作总和。

如果你想要一个公式,你可以使用:

=IF(B2=B3,"",SUMIF(B:B,B2,C:C))

并将其放在单元格 D2 中,然后将其拖到表格底部。

于 2013-07-02T19:40:53.147 回答