I work for a water utility in CA and with the drought we're doing various reports on usage. I've written a macro that takes output from our billing software and gets it close to a usable form. But the next step I want to do has me stumped. The small data sample I've shown here will have thousands of rows. Each Loc# is a water meter. Most Loc#s will have only 6 billing periods a year unless the account changes hands. Then there will be a final bill generated. For the purposes of my final report I need to have each location number have six billing periods for comparison with previous years. I would like to have code that will find duplicate instances of a month within each Loc#s billing periods (July in the sample below) add the values together then delete one row. This would solve most but not all my problems as we have had instances of accounts changing hands several times in a billing period. Any suggestions would be appreciated. (Underscores are spaces)
Loc# BillDate _Usage Count - In the count column Is a formula to count the instances of each Loc#
2123 01/05/15 __5____ 1
2123 03/04/15 _10____ 2
2123 05/05/15 _13____ 3
2123 07/03/15 _15____ 4__ The current 4 count row would be deleted after it's value is added to the next row
2123 07/21/15 __9____ 5__ This row becomes 2123 07/21/15 _24 ____4
2123 09/02/15 _15____ 6
2123 11/03/15 __8____ 7
2142 01/05/15 __4____ 1
2142 03/04/15 __7____ 2
etc
Loc# BillDate _Usage Count - In the count column Is a formula to count the instances of each Loc#
2123 01/05/15 __5____ 1
2123 03/04/15 _10____ 2
2123 05/05/15 _13____ 3
2123 07/03/15 _15____ 4__ The current 4 count row would be deleted after it's value is added to the next row
2123 07/21/15 __9____ 5__ This row becomes 2123 07/21/15 _24 ____4
2123 09/02/15 _15____ 6
2123 11/03/15 __8____ 7
2142 01/05/15 __4____ 1
2142 03/04/15 __7____ 2
etc