extracting data from multiple downloaded excel bank statements with different layouts

cookienomnomnom

New Member
Joined
Mar 8, 2014
Messages
6
Hi

Would it be possible to guide me to a video or some resource that anyone believes might address my problem? Or, does anyone have ideas for a solution?

My problem is: -

I want to extract information from downloaded excel formatted bank statements into my excel financial manager I've created.

I need to do this so I can proceed to analyse data based on one, workable record sheet. However, the bank statements come in varying layouts, which has created this problem I now face.

Background: -

There are several different bank accounts that I can download excel statements from, but they all come in different formats. E.g. one bank uses 3 columns in their transaction description, whereas another bank only has one column but with a lot of information (text and numbers) in it. I've gone through the downloaded transactions and filtered out duplicates and in some accounts I have found that there aren't many duplicates. However, there are key words that I've generally noticed that are used in most transaction records, which could be used to my advantage - I would think.

I've mentioned that I've created a financial manager: I'm ultimately trying to create a highly comprehensive financial model for the household and use this for planning and budgeting, among other things, as part of the manager.

So far, I've only recorded the transactions that have been made in person (including cash and electronically made transactions) by ensuring each person provides me with receipts. However, most of the automatically made transactions I've missed and it's difficult to keep up, mainly because there are several different bank accounts. To illustrate, in addition to cash-flow between 3 people, there is also a total of 15 accounts amongst 5 different banks (with very different layouts used in their downloadable excel-formatted statements).

I only use drop-down list menus using the data-validation tool to ensure consistency. The criteria I use (the columns from left to right) when inputting records into my manager include: year, month, day, name, cash or name of bank, account type (e.g. savings or credit card), money in/out, variable/semi-variable/fixed, category, sub-category, remark (remark is not subject to data-validation, so I can freely type other details).

As I mentioned before, the downloaded bank statements have from 1 to 3 descriptive columns, but have many criteria within one column. I want to be able to extract this information so that I can consolidate everything into one sheet, or at least be able to consolidate everything from many record sheets to analyse in terms of something - e.g. fixed expenses - on one sheet. I think it'll be easier to consolidate all accounts into one record sheet and then analyse based on that one sheet.

I hope I made sense. Would someone be able to provide some guidance to a video that addresses this kind of thing?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi Cookienomnomnom,

that sounds like a fun task you set yourself to. I have created several tools in my programming career, but 99% of the time I needed to make an import script for every different type of data (aka every bank) I wanted to import. So what I would do in your case is do exactly that: create an import sheet for every type of bank statement, import it and indeed, like you described, transform it into a uniform table shape. That uniform table is then pretty easy to analyse and/or process, getting the information into the right format is the nasty work. To start of with, you could try to do the work manually and then slowly develop the program to automate it all. If you want somebody to have a look at it, I'd be happy to, please do post a link (dropbox/skydrive/etc) here.

Hope that helps a bit?

Koen
 
Upvote 0
Hi Koen


Thank you for your reply, it's much appreciated. It does help a lot!


I was hoping I could creative some lovely formula using functions like 'Find', 'Search', 'IFS' and all the rest of them, but like you said it's probably the way to go to slowly develop a program for each different bank statement. I've never written a program before in my life and I've only just started playing around with excel about 2 months ago. I only discovered macro the night I started this thread as well and I've just started playing around with that.


Thank you for the suggestion - I think it's what I need to do. I'll try to record and slowly develop macros for each statement type. Was it to use macro you had in mind re a program? I don't know what else to use to create automation.


Cheers,
cookienomnomnom
 
Upvote 0
Hey Cookienomnomnom,

2 month newbie to Excel, welcome to this world :). Then I have some hints that might help you:
-have a look at the Microsoft templates, there are quite a few free for personal expenses, simple monthly budget etc. Not 100% matching your needs, but they might inspire you for some cool features in your file.
-macros are indeed the bits of programming code to automate Excel. The language is called VBA (Visual Basic for Applications) and you can basically use it to automate anything in MS Office. An extreme example: I recently built a macro in Excel that, with 1 push of a button, connects to a database to pull in information, arranges that information in tables and charts, pastes the charts to powerpoint, saves that powerpoint file, attaches the file to an outlook email and sends it to a bunch of people.
-Excel has the nice feature of macro recording that is by no means enough to record anything you want, but I normally use it as a base to build on. Switch on the developer ribbon-bar to access that menu.
-The shortcut for the VBA editor is ALT+F11

As said, I'd happily help you with some pointers, I've made my fair share of bookkeeping and reporting systems ;). See e.g. https://www.dropbox.com/sh/l7ywfwzfk5j20sr/dJ6Jk0NGyM (file called BookkeepingTemplateV2.xls is a non-macro bookkeeping system, the others are other issues I solved on this forum, feel free to check them out)

Cheers,

Koen
 
Upvote 0
Hi Koen

My approach so far is to build a formula that will end up being suitable for each of the 15 accounts. I based it on the logic that there are key words in the description, which the FIND function will return some number (its location in the cell) if it exists. All i'm interested in is if there's a number or no number, so i used the ISNUMBER (TRUE/FALSE) function to do this. So if there's a TRUE from this, then i wanted one of the three criteria i am using to be returned: 1) Variable, Semi-Variable or Fixed; 2) a general descriptor e.g. car, groceries; 3) a more detailed descriptor e.g. Coles, Woolworths, Bakery (for Groceries) or Fuel, Maintenance (for Car). If no number was returned, then I'd leave it blank.

The basic formula structure is:
=IF(ISNUMBER(FIND("a word or words", $A3)), "Descriptor", "")

$A3 is the description column provided by the bank.

It's a developing thing for each of the 15 accounts :(

See the formula for one bank:

Criteria 1)
IF(OR(AND(OR($F7=410,$F7=190),AND(ISNUMBER(FIND("FUNDS TFER",$J7)),ISNUMBER(FIND("495328007",$J7)))),ISNUMBER(FIND("TFR PROG SAVER",$J7)),ISNUMBER(FIND("ACCOUNT SERVICING FEE",$J7)),ISNUMBER(FIND("QLD TRANSPORT REN",$J7))),"Fixed",IF(OR(ISNUMBER(FIND("BPAY TELSTRA",$J7)),ISNUMBER(FIND("WOOLWORTHS",$J7)),ISNUMBER(FIND("COLES",$J7)),ISNUMBER(FIND("FARMERS MARKET",$J7)),ISNUMBER(FIND("MEATS",$J7)),ISNUMBER(FIND(" IGA ",$J7)),ISNUMBER(FIND("FROM ATO",$J7))),"Semi-Variable",IF(OR(ISNUMBER(FIND("MICCOLINIS",$J7)),ISNUMBER(FIND(" BP ",$J7)),ISNUMBER(FIND("MCARE BENEFITS",$J7)),ISNUMBER(FIND(" HOYTS ",$J7)),ISNUMBER(FIND(" KMART ",$J7)),ISNUMBER(FIND(" ATM ",$J7)),ISNUMBER(FIND(" SUPPORTERS ",$J7)),ISNUMBER(FIND(" HEALTHY LIFE GROUP ",$J7))),"Variable","")))

Criteria 2)
IF(AND(OR($F7=410,$F7=190),AND(ISNUMBER(FIND("FUNDS TFER",$J7)),ISNUMBER(FIND("495328007",$J7)))),"Income",IF(OR(ISNUMBER(FIND("WOOLWORTHS",$J7)),ISNUMBER(FIND("HEALTHY LIFE GROUP",$J7)),ISNUMBER(FIND("COLES",$J7)),ISNUMBER(FIND("FARMERS MARKET",$J7)),ISNUMBER(FIND("MEATS",$J7)),ISNUMBER(FIND(" IGA ",$J7))),"Groceries",IF(ISNUMBER(FIND("BPAY TELSTRA",$J7)),"Phone",IF(ISNUMBER(FIND("TFR PROG SAVER",$J7)),"Savings",IF(ISNUMBER(FIND("ACCOUNT SERVICING FEE",$J7)),"Fees",IF(ISNUMBER(FIND("MICCOLINIS",$J7)),"Eat_Out",IF(ISNUMBER(FIND("QLD TRANSPORT REN",$J7)),"Registration",IF(ISNUMBER(FIND(" BP ",$J7)),"Car",IF(ISNUMBER(FIND(" HOYTS ",$J7)),"Entertainment",IF(ISNUMBER(FIND(" KMART ",$J7)),"Superstore",IF(ISNUMBER(FIND(" MCARE ",$J7)),"Healthcare",IF(ISNUMBER(FIND(" ATM ",$J7)),"Funds_Transfer",IF(ISNUMBER(FIND("FROM ATO",$J7)),"Tax",IF(ISNUMBER(FIND(" SUPPORTERS ",$J7)),"Donation",""))))))))))))))

Criteria 3)
IF(AND(OR($F7=410,$F7=190),AND(ISNUMBER(FIND("FUNDS TFER",$J7)),ISNUMBER(FIND("495328007",$J7)))),"Alldone",IF(ISNUMBER(FIND("WOOLWORTHS",$J7)),"Woolworths",IF(ISNUMBER(FIND("COLES",$J7)),"Coles",IF(ISNUMBER(FIND("FARMERS MARKET",$J7)),"Farmers Market",IF(ISNUMBER(FIND("BPAY TELSTRA",$J7)),"House Phone",IF(ISNUMBER(FIND("TFR PROG SAVER",$J7)),"Prog Saver",IF(ISNUMBER(FIND("MEATS",$J7)),"Butcher",IF(ISNUMBER(FIND("ACCOUNT SERVICING FEE",$J7)),"Bank",IF(ISNUMBER(FIND("MICCOLINIS",$J7)),"Dining",IF(ISNUMBER(FIND("QLD TRANSPORT REN",$J7)),"Trailer",IF(ISNUMBER(FIND(" BP ",$J7)),"Fuel",IF(ISNUMBER(FIND("MCARE BENEFITS",$J7)),"Refund",IF(ISNUMBER(FIND(" HOYTS ",$J7)),"Cinema",IF(ISNUMBER(FIND(" KMART ",$J7)),"Kmart",IF(ISNUMBER(FIND(" ATM ",$J7)),"Cash_Withdrawal",IF(ISNUMBER(FIND("FROM ATO",$J7)),"Refund",IF(ISNUMBER(FIND(" IGA ",$J7)),"IGA",IF(ISNUMBER(FIND(" HEALTHY LIFE GROUP ",$J7)),"Health store",IF(ISNUMBER(FIND(" SUPPORTERS ",$J7)),"Surf Lifesavers",IF($H7="Groceries","Other",""))))))))))))))))))))
 
Upvote 0
Hi Cookienomnomnom,
would you happen to have an (anonomized/numbers changed) file? As in: when I look at your formulae they look way too long and complicated to be maintainable (say adding an extra category) and I think I can help you with an easier method, but then I'd have to have a look at the real data.
Cheers,
Koen
 
Upvote 0
Hi Cookienomnomnom,
there you go: https://www.dropbox.com/sh/l7ywfwzfk5j20sr/dJ6Jk0NGyM (your file is called BANK statement_2.xlsx , the other files are other questions I answered in this forum, feel free to browse around).
Some of the Excel features I used:
-firstly, I created a new sheet, called Static. I basically want to use that to collect your categories etc.
-To start with, I created the categories (columns H, I, J)
-Then I created a named range for each list, calling them ListSomething. You can find the named ranges under "Formulas->Name manager" and reach the named ranges with the little dropdown box left of the formula bar. They are practical, as your formulas will then change from e.g. "=COUNTIF(J3:J13,"A*") to =COUNTIF(ListDetails,"A*"), which is more readable :).
-Then I created a kind of lookup table for your descriptions. Basically I want the formula to run through the list and check each description to see in which category that booking should be. This should give you much more overview then your nested formulas. Notice here: I used Validation (Ribbon: Data->Data Validation) to limit the input to your lists.
-You used the FIND function, I changed that for the SEARCH function, as the SEARCH function can work with wildcards and FIND can't. So FUNDS TFER*795487531 would search for anything containing those FUNDS TFER and 795487531 with anything in between.
-Next, the real magic is in the array formula in column G in your bank statement: =MIN(IF(ISNUMBER(SEARCH(LookupBank,F6)),ROW(LookupBank);999)) . What you will notice is that there are {}s around the formula. This indicates that it's an array formula, created by typing CTRL+SHIFT+ENTER after you typed in the formula (NOT just enter). What it will do: basically loop through LookupBank (that is Static!A3:A21) and try each cell and find the first (minimum) row with a match. If there is no match, the formula will return 999 (just a big number).
-Finally, the columns next to that are an OFFSET to pick up the category values.

Hope that gets you moving faster :),

Koen
 
Upvote 0
That is a much much much better way of doing what I was trying to achieve. Thank you so much, Koen!

I noticed you placed that array formula in a separate column. Is this an efficient way of doing it rather than substituting that stand-alone formula into the three descriptor columns, thus making all the three columns array formulas?

So instead of:

RowFnd - Category - Reason - Detail

... where Rowfnd consists of the following formula:
{=MIN(IF(ISNUMBER(SEARCH(LookupBank,F7)),ROW(LookupBank),999))}

... and where the rest of the three use this formula:
=IF($G6<999,OFFSET(Static!$B$2,$G6-2,0),"") ----- where G6 is the reference to the array formula.

have:

Category - Reason - Detail

... where all three columns have array formulas:
{=IF(MIN(IF(ISNUMBER(SEARCH(LookupBank,F7)),ROW(LookupBank),999))
<999,OFFSET(Static!$B$2,MIN(IF(ISNUMBER(SEARCH(LookupBank,F7)),ROW(LookupBank),999))
-2,0),"")} ------- where the underlined would have been G6 previously

Would having all of the columns as array formulas add a lot more processing demands than what is necessary for the sake of omitting one column (RowFnd)?
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,375
Members
448,888
Latest member
Arle8907

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