Excel VBA: 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/04/01
7:43 UTC
Read the original article
Hit count: 307
excel-vba
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 | 2010-03-12
0010019991 | 1800136388 | 162.00 | 2010-02-12
0010019991 | 1600008004 | -36.00 | 2010-03-15
0010021791 | 1800132148 | 162.00 | 2010-03-12
0010021791 | 1800145436 | 162.00 | 2010-02-12
0010021791 | 1600007737 | -12.00 | 2010-03-15
0014066147 | 1800119068 | 1,684.80 | 2010-03-12
0014066147 | 1800123702 | 1,684.80 | 2010-02-12
0014066147 | 1600007980 | -1,300.80 | 2010-02-15
0014066147 | 1600007719 | -1,286.40 | 2010-03-15
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 | D
0010019991 | 1800149471 | 126.00 | 2010-03-12
0010019991 | 1800136388 | 162.00 | 2010-02-12
0010021791 | 1800132148 | 150.00 | 2010-03-12
0010021791 | 1800145436 | 162.00 | 2010-02-12
0014066147 | 1800123702 | 782.40 | 2010-02-12
© Stack Overflow or respective owner