Automating totals for keywords

optimystery

New Member
Joined
Feb 11, 2015
Messages
2
Hi, I am relatively new to Excel. I use it mainly for accounting, and realised that I was spending a lot of time doing repetitive highlighting of cells and copy/paste. I know the basics of programming so I'm prepared to dive in at the deep end.

What I would like to do is the following:
  • search an annual .csv I export from my online banking
  • separate results by month (format I get is 01/07/2014)
  • find keywords within a string and create a group total (Sainsburys & Waitrose goes to a total for 'food', LUL & First Capital Connect goes to a total for 'travel' etc)
  • I would then copy and paste this into another spreadsheet, but if it would be possible to import the totals to specific fields that would be even better.

Is any of the above possible and feasible?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
VBA could certainly do this, but the code involved requires detailed understanding of the actual export and how it pulls into Excel.
When you do this manually and bring in the csv data, does it pull in as a clean table? Are there junk rows/columns? Does the date come in formatted as text? etc

There may be some quick non-VBA alternatives. A formula to identify the month and something like a VLOOKUP could be used to classify specific entries as "Food", others as "Utilities", etc. Then you could create a pivot table that would give a solid summary by month. Even if the export has a lot of junk in it, you can usually put I a formula to identify the records you care about only and include that in the pivot criteria.
 
Upvote 0
I could attach a .xlsx file but there doesnt seem to be an option to do that?
It looks like this..
The Totals section is something I added to show how the script might output totals.


Transaction DateTransaction TypeSort CodeAccount NumberTransaction DescriptionDebit AmountCredit AmountBalance
04/08/2014DEBxx-xx-xxxxxxPOST OFFICE COUNTE CD xxxx10x
28/07/2014DEBxx-xx-xxxxxxSAINSBURYS S/MKTS CD xxxx50x
28/07/2014DEBxx-xx-xxxxxxWAITROSE CD xxxx50x
TotalsJulyAugust
Postal / Expenses010
Food Shopping1000

<colgroup><col span="4"><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,326
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top