Excel VBAa: Sum invoice by client id with copying result to new worksheet

Posted by Melkior on Stack Overflow See other posts from Stack Overflow or by Melkior
Published on 2010-03-31T16:29:10Z Indexed on 2010/03/31 16:33 UTC
Read the original article Hit count: 322

Filed under:

Hi, i have strange problem doing reporting:

i have numerous clients with different issued invoices. Problem comes to the point when there are invoices in minus and plus:

Column A consists of client unique IDs, Column B invoice number, column C invoice amount

A | B | C

0010019991 | 1800149471 | 162.00

0010019991 | 1800136388 | 162.00

0010019991 | 1600008004 | -36.00

0010021791 | 1800132148 | 162.00

0010021791 | 1800145436 | 162.00

0010021791 | 1600007737 | -12.00

0014066147 | 1800119068 | 1,684.80

0014066147 | 1800123702 | 1,684.80

0014066147 | 1600007980 | -1,300.80

0014066147 | 1600007719 | -1,286.40

I need to remove rows with negative invoices in a way that amount is summed with invoices which are not with negative amount. So that final result would look like: A | B | C

0010019991 | 1800149471 | 126.00

0010019991 | 1800136388 | 162.00

0010021791 | 1800132148 | 150.00

0010021791 | 1800145436 | 162.00

0014066147 | 1800123702 | 782.40

© Stack Overflow or respective owner

Related posts about excel-vba