+ Reply to Thread
Results 1 to 5 of 5

Attempting to Organize Spending into Categories

  1. #1
    Registered User
    Join Date
    09-17-2019
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    2

    Attempting to Organize Spending into Categories

    Hello,

    As the title states, I am attempting to write a function that will return a category for debits within a bank statement. For example, if the column to the left contains the text "LITTLE CEASARS" I would like it to return "Restaurant", if it contains "AMAZON" I would like it to return "Amazon", etc. I'm sure there's a way to do this but I cannot get it dialed in. Here is what I'm working with so far:

    =IF(SEARCH("LITTLE CEASARS",G3),"Restaurant", IF(SEARCH("AMAZON",G3),"Amazon"), "Other")

    The first part of that function just searching for "LITTLE CEASARS" would return "Restaurant" correctly, until I added the second IF function. Now excel is just telling me there is a problem with the formula.

    Thank you for the help,
    Josh

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Attempting to Organize Spending into Categories

    Hello Josh.

    Welcome to the forum.

    This sounds like a job for a lookup table ... to eliminate a lot of nested "IF" formulas. A lookup table also makes editing .... adding to and deleting returns much simpler.

    Something like this with names alphabetic in column A


    A
    B
    1
    AMAZON
    Amazon
    2
    CASEY'S
    Fuel
    3
    COUNTYMARKET
    Groceries
    4
    FARM AND FLEET
    Farm & Fleet
    5
    KROGER
    Groceries
    6
    LITTLE CAESARS
    Restaurant
    7
    MCDONALDS
    Restaurant
    8
    MOBIL
    Fuel
    9
    MURPHY'S
    Fuel
    10
    SAVEALOT
    Groceries
    11
    SHELL
    Fuel
    12
    WALGREEN'S
    Rx
    13
    WALLMART
    Walmart


    Then =LOOKUP(G3,$A$1:$B$13) returns "Fuel" if G3 = "mobil".

    Does this sound like something you could work with ?
    Dave

  3. #3
    Registered User
    Join Date
    09-17-2019
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    2

    Re: Attempting to Organize Spending into Categories

    Dave,

    Thank you for the reply! That does sound much simpler. I've attempted that function but for some reason it is returning the same thing for all the rows? Any advice on what I've done wrong?

    I've tried to attach a screenshot.

    Thanks again,
    Josh
    Attached Images Attached Images

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Attempting to Organize Spending into Categories

    Try this in H2 instead:

    Please Login or Register  to view this content.
    Edit: I updated this to be a bit more robust.

    WBD
    Last edited by WideBoyDixon; 09-18-2019 at 10:49 AM.
    Office 365 on Windows 11, looking for rep!

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Attempting to Organize Spending into Categories

    OK. I see. This will need revision.

    In H3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    where G3 contains an item from the lookup table 1st column.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to organize and filter data with multiple categories and subcategories
    By rooiro in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-01-2018, 12:35 PM
  2. Trying to Figure Out a Max Spending Formula
    By DRest608 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-29-2017, 12:16 PM
  3. Personal Spending
    By agriffiths in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-29-2015, 07:27 AM
  4. Replies: 1
    Last Post: 05-15-2013, 06:55 AM
  5. Replies: 0
    Last Post: 07-22-2011, 03:51 PM
  6. Categories and Sub-Categories in Column Charts
    By theoneness in forum Excel General
    Replies: 2
    Last Post: 11-28-2009, 10:05 PM
  7. spending and budget list
    By drewhansh in forum Excel General
    Replies: 1
    Last Post: 07-01-2007, 10:57 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1