You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Simplifying transaction details in imported bank statement in Numbers

I'm positive someone has asked this question before, but for the life of me, I still can't find the answer after hours of searching.


Goal 1: I'm trying to compile a Numbers table of bank transactions for this year, so I can create a budget based on our spending habits including monthly expenses for subscriptions/automatic payments, etc.


Goal 2: I'm also trying to set up the table in a way that is sustainable for using in 2025 with minimal effort/manual reformatting (i.e. I can paste in the new monthly bank statements from either bank and have the information end up in the correct column with the correct text formatting and without the extraneous information (see below.)


Issue 1: when I copy and paste a bank statement into the table, I end up with really long transaction descriptions like "Withdrawal REGULAR DEBIT AMAZON MKTPL*R49425Z45 Amzn.com/bill WA Date 08/22/24 24452164201535062826358 5942." I'm trying to figure out how to have Numbers turn these strings of useless information into something like "Amazon Marketplace" instead, so the data is more easily read, searched, and sorted.


I read something about using an "extract" command or function, but I don't understand how to go about using that. I tried "find and replace" but without the ability to use wildcards in the search, it's pretty useless in this scenario (I could find all the instances of a given word, but what I want is to replace all of the text in that cell with only that given word, so I'd need to be able to search for "*amazon*" and replace with "Amazon."


The other possibility I read about is using the "IFS" function, since you can use wildcards in it, but I'm not sure how to format that command to return the right information and have it be repeatable for all subsequent entries. I understand some "if, then" commands, so while eI was at a dead end with how to go about this, I did end up making a sort of lookup table that contained a list of each keyword that would return a hit for each of my transactions (or each store or payee, rather), and a corresponding list of what I'd like to populate that cell with instead. It looks something like this:



Problem being some stores don't use a consistent language in their transaction descriptions (for example, a transaction at a Walmart, depending on which store you shopped at, might contain any one of the following: WalMart, WALMART, WAL-SAM, or even just the street address (several occurrences of which I had to google map just to figure out what store the transaction happened at). In my ideal transaction table, I really don't care what city the Walmart was in, I'd like them all just to read "Walmart." How do I set up the "IFS" function to return "Walmart" if it encounters "WalMart, "WALMART," "WAL-SAM," or "20 College Dr?" I assume Wal* might work for most, but the address? And are the search values case sensitive?


Issue 2: We have two bank accounts at two different banks, so the unmodified .csv files downloaded from "Bank A" and "Bank B," once opened in Numbers, are formatted differently. See the examples of Bank A and Bank B tables below:

and what I'm looking to end up with:

Is this just something I'm going to have to deal with manually? Or is there a way to paste in the bank table so the correct values go into the corresponding column?


Thank you so much for any "hand-holding" you have to do to help me figure this out. I'm relatively capable with formulas, but I'm not as experienced in this aspect of numbers. :)

Kate

MacBook Pro 15″, macOS 12.7

Posted on Nov 25, 2024 5:55 AM

Reply
2 replies

Nov 25, 2024 7:40 AM in response to adjective_noun_number

Here is a solution that is similar to what you are asking. You can modify it to fit your exact requirements. It determines the category of expense from the description. You will have to be mindful of the entries you make in Table 2 so you do not get false matches. For example, if you have the one entry that is "CVS" and another that is "CVSolutions", put the longer one first so that a transaction for "CVSolutions" doesn't get matched to the shorter substring "CVS". Capitalization does not matter, everything is converted to lower case in the lookup formula.



Formula in the footer row of the Table 2 =TEXTJOIN("|",1,A)

You will hide this row after you get the table set up.


Formula in cell E2 of Table 1 =IFERROR(XLOOKUP(REGEX.EXTRACT(LOWER(C),LOWER(Table 2::B$18)),Table 2::A,Table 2::B),"")

Fill down to complete the column.

Simplifying transaction details in imported bank statement in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.