+ Reply to Thread
Results 1 to 3 of 3

Category Totals Using Lists

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    11

    Question Category Totals Using Lists

    This is my second post: I love this forum! So many experts out there willing to help - this is wonderful.

    I know how to accomplish this using PHP, JavaScript, MySQL, and other programming languages, but I never learned VBA. I hope this can be accomplished using formulas. You tell me.

    Attached is a simplified example of the report I'm working with.

    1) Transaction data is downloaded into excel.

    2) There is a PARMS worksheet containing:
    A) A LIST named CATS containing Category Names.
    B) A LIST named SUBCATS containing Sub-Category Names.
    C) A LIST named FINDSTR containing substrings to FIND within downloaded Transaction Description strings.
    D) A column named IS_CAT next to FINDSTR, indicating which Category each FINDSTR belongs to.
    E) A column named IS_SUBCAT indicating which Sub-Category each FINDSTR belongs to.

    3) There is a REPORT_DATA worksheet containing the downloaded transaction data (Date/TransactionDescription/Amount):
    A) With a column named SUBCAT added where the corresponding Sub-Category should be listed for each transaction, based on the existence of FINDSTR in the Transaction Description.

    4) There is a CATEGORY_TOTALS worksheet that shows Totals By Category and Sub-Category.

    So basically, I need to know how to do this:

    On the REPORT_DATA worksheet:

    FOR Each REPORT_DATA Row,
    LOOP THRU PARMS!FINDSTR:
    IF PARMS!FINDSTR exists in Transaction Description, REPORT_DATA!SUBCAT = the corresponding PARMS!IS_SUBCAT
    END LOOP
    END FOR

    To create the CATEGORY_TOTALS worksheet:
    - I think I can figure this out using =SUMIF, once I have the SUBCAT labels on the REPORT_DATA worksheet.

    I hope I've explained this well enough. Any and all advice is appreciated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Category Totals Using Lists

    Hi and welcome to the forum

    Not sure if this is something you can work with, but give it a shot - the hardest part was matching the FINDSTR to teh data. This is based on there only being 3 "FINDSTR" with unique 1st words (you can add more to the IFERROR() part is needed)
    I added 2 helpers on REPORT sheet (you could do it with 1, but it would get messy, or you could so it with more than 2, to simplify it even more?). 1st helper replaces : with "space", 2nd pulls the FINDSTR equivalent from the TRANS.

    On TOTALS, I pulled in teh totaks for you, using SUMIF() as you already suggested
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Category Totals Using Lists

    This was the easiest I could think of using supplied data and named ranges
    this Array Formula in D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Drag down

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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. Pivot Table -- Category Grand Totals
    By Tyler.Primecp in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-14-2012, 01:33 PM
  2. [SOLVED] SUM TOTALS IF CATEGORY equals to defined values
    By lemuel in forum Excel General
    Replies: 5
    Last Post: 04-24-2012, 11:52 AM
  3. Creating lists based on category
    By NearClueless in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2009, 04:02 PM
  4. [SOLVED] Adding category totals
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-15-2006, 06:50 PM
  5. [SOLVED] COMPARE 2 LISTS AND SEE COMBINED RESULTS BY CATEGORY
    By Tony in forum Excel General
    Replies: 0
    Last Post: 12-27-2005, 07:10 PM

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