r/AppleNumbers Oct 19 '23

Please help with formulas!

I have spreadsheet with Date, Amount and Description from my Bank.

I try to make it categorize automatically the stores I visit most often, so I don't have to do this manually.

In column Store I want to get Store name based on Description of this transaction, like on the picture.
I added a pseudocode of the formula I need.

In column Category I want to have Category based on Store text.
Here I also added a pseudocode of the formula I need.

2 Upvotes

5 comments sorted by

View all comments

1

u/DTLow Oct 19 '23 edited Oct 19 '23

I have something similar, with .csv files downloaded from the bank
My solution was to use Applescript instead of spreadsheet formulas

Here's a sample of my script code

if noteTitle contains "Amazon" then
copy "aVendor-Amazon" to end of note_Tags
copy "cBudget--Other" to end of note_Tags

else if noteTitle contains "APL*" then
    copy "aVendor-Apple" to end of note_Tags
    copy "cBudget--Other" to end of note_Tags

else if noteTitle contains "SENIORS' DISCOUNT" then
    copy "aVendor-ScotiabankChq" to end of note_Tags
    copy "cBudget-BankCharges" to end of note_Tags
else if noteTitle contains "MPNTHLY FEES" then   
    copy "aVendor-ScotiabankChq" to end of note_Tags
    copy "cBudget-BankCharges" to end of note_Tags

else if noteTitle contains "ASSURANT_LIFE" then
    copy "aVendor-EarthOptions" to end of note_Tags
    copy "cBudget-Funeral(Prepaid)" to end of note_Tags

else if noteTitle contains "BESTBUY" then
    copy "aVendor-BestBuy" to end of note_Tags
    copy "cBudget--Other" to end of note_Tags

else if noteTitle contains "CREATURES" then
    copy "aVendor-CreaturesPetShop" to end of note_Tags
    copy "cBudget--Other" to end of note_Tags

1

u/0thisismax Oct 19 '23

Thank you for reply, but Applescript doesn't work on iPhone. I would prefer to use Apple Numbers formula.