Categorizing Bank statements

jklarsen

New Member
Joined
Aug 11, 2009
Messages
22
Hi All,

I have been trying to find a previous reply to my challenge with no luck, so I am taking the chance a asking you this.

I want to categorise my bank statements and a spending overview, based upon predefined shop names and categories.

- So basically I paste my bank statement into the sheet.
- I have a prefilled sheet with shop names which I update manually
- I want to index bank statement with the predefined shop name
- Finally I want to generate an yearly overview of my spending throughout the year for each category.

Like this:
Screenshot 2021-01-04 at 18.17.00.png


I can't figure out how to:
3. Search for the shop names in the bank statement text and return the shop name, main category and sub category
4. Search for the amount of sub categories in each month, returning the SUM

I also have the file here in my dropbox - Bank Statements.xlsx


Can anybody help guide, how to do this?

Kind regards,

Jan H.
 
I upload my file Table to table and Describe.
1. Table 2
There is some cases where I need to add a " " after the name for it to work,
You can use this function to remove extra spaces at shop names and then paste as value them at source range (Yellow Part)
Excel Formula:
=TRIM(SUBSTITUTE(B21,CHAR(160),CHAR(32)))
2. Table 1
My formula works completely well. (Blue Part)
For Extract month name from Date Use Text Formula (Green Part):
Excel Formula:
=TEXT(B4,"mmmm")
Bank Statements.xlsm
ABCDEFGH
1
21. Bank Statements
3DateamountStatement TextExtract Shop NameExtract MainExtract Sub
41/1/2021-195.00Dankort-nota Louis Nielsen 25053Louis NielsenTransportationParkingJanuary
51/4/2021-155.00Dankort-nota The Coffee Col 12261Coffee ColOther living costsTV & StreamingJanuary
61/6/2021-100.00Dankort-nota OLE MATHIESEN A 6868Ole MathiesenPersonal spendingDoctors & TreatmentJanuary
72/8/2021-200.00Dankort-nota DSB 764 Frh RKA 015DSBHousingFurniture & housing equipmentFebruary
83/1/2021-65.00Visa køb DKK 65,00 Mc Donalds Valby V Den 21.07Mc DonaldsTransportationParkingMarch
93/10/2021-23.07Visa køb DKK 23,07 EASYPARK 280377052 Den 21.07EasyparkTransportationParkingMarch
104/14/2021-509.00Dankort-nota proshop.dk 2211proshop.dkPersonal spendingHardwareApril
115/20/2021-228.00Visa køb DKK 228,00 TORVEHALLERNES FRUGT Den 22.07Others  May
124/14/2021-221.50Visa køb DKK 221,50 Hav Torvehallerne AS Den 22.07Others  April
134/14/2021-140.00Visa køb DKK 140,00 THE COFFEE COLLECTIV Den 22.07Others  April
145/14/2021-100.00Visa køb DKK 100,00 STIGS OLIVEN APS K Den 22.07StigsPersonal spendingGroceriesMay
155/14/2021-100.00Visa køb DKK 100,00 LAURAS BAKERY TORVEH Den 22.07Lauras bakeryPersonal spendingCafesMay
166/14/2021-99.00Visa køb DKK 99,00 APPLE.COM/BILL 802 Den 22.07Apple.com/billPersonal spendingOnline servicesJune
176/14/2021-25.00Visa køb DKK 25,00 APPLE.COM/BILL 802 Den 22.07Apple.com/billPersonal spendingOnline servicesJune
18
192. Shop names
20NameMain categorySub category
21McDonalds Personal spendingFast food & Take awayMcDonaldsPersonal spendingFast food & Take away
22Mc DonaldsTransportationParkingMc DonaldsTransportationParking
23Louis NielsenTransportationParkingLouis NielsenTransportationParking
24Coffee ColOther living costsTV & StreamingCoffee ColOther living costsTV & Streaming
25Ole MathiesenPersonal spendingDoctors & TreatmentOle MathiesenPersonal spendingDoctors & Treatment
26DSBHousingFurniture & housing equipmentDSBHousingFurniture & housing equipment
27EasyparkTransportationParkingEasyparkTransportationParking
28proshop.dkPersonal spendingHardwareproshop.dkPersonal spendingHardware
29StigsPersonal spendingGroceriesStigsPersonal spendingGroceries
30Lauras bakeryPersonal spendingCafesLauras bakeryPersonal spendingCafes
31Apple.com/billPersonal spendingOnline servicesApple.com/billPersonal spendingOnline services
Sheet1
Cell Formulas
RangeFormula
E4:E17E4=ExtractShopName($D4,$B$20:$D$31,1)
F4:F17F4=ExtractShopName($D4,$B$20:$D$31,2)
G4:G17G4=ExtractShopName($D4,$B$20:$D$31,3)
H4:H17H4=TEXT(B4,"mmmm")
E21:G31E21=TRIM(SUBSTITUTE(B21,CHAR(160),CHAR(32)))
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
3. For Table 4
I transposed it and paste at Sheet 2 (Also you can copy all of Main & sub Categories to sheet 2 (Column A & B) and then Select all , Go to Data Tab, Remove Duplicate and select Both Columns . if you want sort, Then Sort it, I also add Macro to do both remove duplicates and sort)
Then Add month Name as Headers for Columns from Column C to N.
Finally Use Sumifs Formula:
Excel Formula:
=SUMIFS(Sheet1!$C$4:$C$17,Sheet1!$F$4:$F$17,$A2,Sheet1!$G$4:$G$17,$B2,Sheet1!$H$4:$H$17,C$1)
Bank Statements.xlsm
ABCDEFGHIJKLMN
1Main categorySub categoryJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
2HousingDoctors & Treatment000000000000
3HousingFurniture & housing equipment0-2000000000000
4HousingInsurance000000000000
5HousingMaintenance000000000000
6Other living costsOnline Services000000000000
7Other living costsParking000000000000
8Other living costsSports & Hobbies000000000000
9Other living costsTV & Streaming-15500000000000
10Personal spendingCafes0000-1000000000
11Personal spendingDoctors & Treatment-10000000000000
12Personal spendingFast food & Take away000000000000
13Personal spendingGroceries0000-1000000000
14Personal spendingHardware000-50900000000
15Personal spendingOnline services00000-124000000
16TransportationGas000000000000
17TransportationMaintenance000000000000
18TransportationParking-1950-88.07000000000
Sheet2
Cell Formulas
RangeFormula
C2:N18C2=SUMIFS(Sheet1!$C$4:$C$17,Sheet1!$F$4:$F$17,$A2,Sheet1!$G$4:$G$17,$B2,Sheet1!$H$4:$H$17,C$1)
 
Upvote 0
Thank this is awesome.

Is there anyway to transpose back to the original layout.
I use this to compare expenses between years, which is easier with the original layout

Many thanks.


Best...Jan
 
Upvote 0
Yes. Again Copy and Paste Tranposed Your Data.
Also You can use VBA & Macros.
 
Upvote 0
Thus. At Row 50 fill all cells. same as uploaded and Use formula at C52 and drag it right & down.
Cell Formulas
RangeFormula
C51C51=D21
D51D51=D24
I51I51=D23
L51L51=D25
C52:N63C52=SUMIFS($C$4:$C$17,$F$4:$F$17,C$50,$G$4:$G$17,C$51,$H$4:$H$17,$B52)
 
Upvote 0
You're welcome & thanks for feedback. Please Tick Best answer post as solving Post with Click on tick of right of Post.
 
Upvote 0
Going through the document Bank statement you uploaded I noticed a different behaviour from what you uploaded.

1610023504356.png


If you notice first line with "Louis Nielsen". It works in yours but only for a few in my setup?
What can be wrong?


Best...Jan
 
Upvote 0
Check Post #11 and compare my formula with yours at Cell E4
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,843
Members
449,471
Latest member
lachbee

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