I have a large spreadsheet that contain client details. Each row represents a client and each column a field associated with the client. e.g. name, address, Payment, Balance.
Each month a new Spreadsheet gets added to the bottom of the existing spreadsheet (changes in month). So after a year the spreadsheet will contain 12 months of transactions.
What I need to do is consolidate these multiply transactions for each client so they only represent one row of data in the spreadsheet.
Example
BEFORE
Unique ref Transaction Date Trans Type Name Address Balance Payment
1957654 12/10/14 New Business Mr Smith 23 Raven Road $40,000 $50.00
1957654 12/11/14 Adjustment Mr Smith 23 Raven Road -$15,000 -$20.00
1957654 12/12/14 Adjustment Mr Smith 23 Raven Road $4,000 $5.00
RESULT
Unique ref Transaction Date Trans Type Name Address Balance Payment
1957654 12/10/14 New Business Mr Smith 23 Raven Road $29,000 $35.00
However, Renewal should restart the Consolidation.
So,
Unique ref Transaction Date Trans Type Name Address Balance Payment
1957654 12/10/14 New Business Mr Smith 23 Raven Road $40,000 $50.00
1957654 12/11/14 Adjustment Mr Smith 23 Raven Road -$15,000 -$20.00
1957654 12/12/14 Adjustment Mr Smith 23 Raven Road $4,000 $5.00
1957654 12/10/15 Renewal Mr Smith 23 Raven Road $30,000 $40.00
Should finish like this.
Unique ref Transaction Date Trans Type Name Address Balance Payment
1957654 12/10/14 New Business Mr Smith 23 Raven Road $29,000 $35.00
1957654 12/10/15 Renewal Mr Smith 23 Raven Road $30,000 $40.00
I think its important to consider the 'Unique reference' as the identifier together with a new field called 'year of account'
So
1957654 will become 14-1957654 for 2014 and 15-1957654 for 2015. This will identify what transactions need to be consolidated so we are not consolidating a 'life of a policy' into one line but consolidating yearly.
Next would be to use the most recent 'transaction date' and then consolidate.
However,
Transactions types.
Lapse - Should Delete all transactions as client row no longer live
Cancelled - Should Delete all transactions as client row no longer live
If the total 'Balance' = 0.00 then also - Delete all transactions as client row no longer relevant. As a balance can't be 0 once consolidated.
THOUGHT PPROCESS
I was thinking the best approach possibly, When the workbook is open, create a 'virtual' SQL database, so the calculation is done in there and then it spits out the results on a new tab in excel.
For the other fields always use the latest fields supplied unless a field is blank then use the one previous. So if a field has been left blank one month it carries the field over from the previous month. Otherwise someone could delete say the clients address in the current month and we will no longer have it going forward?
------------------------------------------------------------------
Finally I have another spreadsheet that needs to do the above, but the transactions do not need to be consolidated but only the latest live risk shown.
(Should this be another thread? - I only include as I thought it might be similar coding)
Really appreciate anybodies input / time. It is a very complex task/build I am asking for.
Bookmarks