Excel VBAa: Sum invoice by client id with copying result to new worksheet
- by Melkior
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