+ Reply to Thread
Results 1 to 5 of 5

Calculating totals from groups using defined lists

  1. #1
    Registered User
    Join Date
    11-13-2007
    Posts
    5

    Calculating totals from groups using defined lists

    Hi everyone, I'm new to this forum and to the world of advanced calculation in Excel. So my question may be run of the mill but please bear with me.

    I have a spreadsheet that has a list defined (Insert->Name->Define). The list is called 'ExpenseCodes'. The purpose of this list is to catergorise the differrent expenses that I have in a month. As you can see in the attached workbook. I have listed a few expenses and a few categories in the 'ExpenseCodes' list.

    Now my question is this. How would I be able, without having to sort the list of expenses, calculate the totals for each category? For Example. In my list, I have made 3 expenses that fall under the 100 category, 2 under 205 and so on. I want to know, if possible, how to create a formulae that will search thru a column, find a specific value, and when it finds that value, add the amount in the column next to it, and eventually give me a grand total.

    The totals for each category should end up being

    100 = 100019
    205 = 425
    200 = 5000
    215 = 200

    Thank you for your help in advance.
    Attached Files Attached Files
    Last edited by reborn64; 11-13-2007 at 09:35 AM.

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi,

    For your first category

    =SUMIF(D2:D8,"=100 purchases",C2:C8)

    Adjust for other codes

    Ed

  3. #3
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520
    Welcome to the forum:

    Try the following:

    on D12 = =SUMPRODUCT(--(ISNUMBER(SEARCH("100", D2:D8))),C2:C8)
    on D13 = =SUMPRODUCT(--(ISNUMBER(SEARCH("200", D2:D8))),C2:C8)
    on D14 = =SUMPRODUCT(--(ISNUMBER(SEARCH("205", D2:D8))),C2:C8)
    on D15 = =SUMPRODUCT(--(ISNUMBER(SEARCH("215", D2:D8))),C2:C8)
    Corine

  4. #4
    Registered User
    Join Date
    11-13-2007
    Posts
    5

    Lightbulb Wow

    Thanks guys, both the answers will work perefectly for me. I'm amazed by how quick that was.

    Again, thanks alot.

  5. #5
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Great,

    Thanks for the feedback

    Ed

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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