Background: I need to clean up a CSV file of my bank statement for use in an online financial reporting tool.
The transactions are all in the following formats (columns seperated by commas):
0901XX 892XXXXX, 24/12/2010, CARD PAYMENT TO MICKEY MOUSE29.90 GBP ON 22-12-2010, -29.9
The problem I have is that the information in the thrid column is all unique because of the inclusion of the transaction amount and date – “CARD PAYMENT TO MICKEY MOUSE*29.90 GBP ON 22-12-2010*”. Consequently, I’m forced to categorise all 200+ transactions individually, which is not condusive with my mental wellbeing.
The best solution I can think of is to remove all numbers from this column and find and replace all of the redundant terms (“GBP ON”, “.”, “-“) with a null value, but I’m not sure how to go about putting that together.
Any help would be greatly appreciated.
The following may help you. I am making the following assumptions:
TextDescription+Amount+Currency+DateFollow these steps:
ALT + F11In module paste the following code, place cursor anywhere in code, and then hit `F5′
This should do the following for each item in column C:
…becomes…
Note that the code works by looking for the first occurence of a number in the description and stripping out everything after that. This assumes that first occurence of a number always denotes the price. If the payment recipient had a number in the name then the code would fail e.g. CARD PAYMENT TO PHONES4U