+ Reply to Thread
Results 1 to 3 of 3

Help with searching for category then adding the value to another cell

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Help with searching for category then adding the value to another cell

    Good afternoon! I am playing around with creating a ledger. What I am trying to do is have Excel automatically search for a transaction category (i.e. Gas, Food, Bills, etc...) within a column then add the value of that trans to another cell. This one is blowing my mind. So I want excel to seach Column 2 for the category, then assign the appropriate value in column 3 to one of the cells in G3:I3. Could this be done with functions or is VBA required and how do I set it up?

    EX:

    .........1............2.........3
    A.....Date......Trans.....Amt
    B.....12/1.......Gas.....$15.00
    C.....12/2.......Food....$6.00
    D.....12/2.......Bills.....$37.00
    E.....12/3.......Food....$12.25
    F......12/4......Bills.....$63.00
    G.....Gas Total:..........???
    H......Food Total:........???
    I........Bills Total:.........???

    Thank you for your help!
    Last edited by johnrriggs22; 12-10-2010 at 10:10 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help with searching for category then adding the value to another cell

    1) Move your totals out of the same columns you're collecting data in. Much simpler if the data and the totals are kept in separate sections of your worksheet. Plus, you can add data to the bottom of the data columns and the totals will continue to sum.

    2) Then use a standard SUMIF() to collect all the items that match the categories.

    Sample attached.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-10-2010
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Help with searching for category then adding the value to another cell

    Excellent! Thank you very much for your help!
    Last edited by johnrriggs22; 12-10-2010 at 10:11 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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