+ Reply to Thread
Results 1 to 21 of 21

Category SUM by Year - Help Needed. Thanks!

  1. #1
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Category SUM by Year - Help Needed. Thanks!

    Hi, I have been racking my brain on this one and can’t figure out a solution…

    I have a spreadsheet that tracks expenses by category (Staffing, Travel & Entertainment, MKTG, etc.). I want to be able to display the data by “expense category” and by “year” on a pie chart or graph.

    As the sheet is now, I enter a description of the expense in column A and then select from a dropdown in column C (period) to identify the expense as monthly or one-time. I then enter the “Date / Begin Date” (column E) of the expense. The monthly expenses are calculated on a going forward basis for each year through 2018. In other words, if I enter Office Rent of $2,000 as a monthly expense that starts in Jan 2014, each month going forward has the $2,000 expense in the total. One-time expenses are only added to the month they are incurred. The expense totals are then added to a separate tab as “recurring” or “non-recurring” by month and compared to sales forecast numbers to measure cash flow.

    I added a column (B) to the sheet for each “expense category” which is selected from a dropdown list.
    I need help with the formula to separate the expense by category and calculate the total by year based on the dates from E. I had help creating this sheet and I’m over my head on this new feature… Any help is greatly appreciated!!

    Attached is an example sheet with a mock-up of how the inputs are now. Unfortunately, I can’t post the actual sheet due to the info already in there…

    Many thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Try: B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied across and down


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Hi Trevor, thanks for your help! The formula gave the total for the single year but does not carry over the following years and the monthly expenses are recurring thru 2018... Forgive me but I'm a "power user" at best and provided a poor example of the sheet... I uploaded a new file that will show you the data better... The person who created the sheet doesn't work with me any longer so I really appreciate the help!

    Cheers,

    Jim

  4. #4
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Category SUM by Year - Help Needed. Thanks!

    Hi Jim,

    TMS's formula works fine.. You just need to adjust the worksheet ranges used. Refer enclosed workbook.

    Your formulas were referring to incorrect ranges and also you missed including one or two Expense categories.
    Attached Files Attached Files
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  5. #5
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Yeah, there were several hidden rows that I didn't have on the first file... Since the "monthly" expenses are ongoing, they should appear each year. Any ideas?

  6. #6
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Hi, the new sheet also doesn't seem to allow for new expenses. I tried adding a few and they didn't appear - both in categories that aren't currently populated with an amount (like sales commissions) and in new dates/years (like staffing-employee for 2017). I think the original sheet allows 2000 rows in the expense tab to accommodate for new additions. Thanks again!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    I've made the Expense Categories List a Dynamic Named Range and adjusted the formula to reflect the different data range. See the attachment.

    B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Hi Trevor,

    The expenses that recur should do so for each subsequent year - so a monthly or quarterly expense in 2014 would also be duplicated in 2015, 2016,2017 & 2018, all starting from the date entered in E (date / begin date). Also, is there a way to allow for additional rows on the expense sheet? Right now it's limited to 73 so I can't add any new expenses - the original sheet has up to 2000 so there can be additional expenses added.

    Thank you so much! I wish I had your skill

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Suggest you try taking out the date check part where it is Monthly or Quarterly.

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Sorry, missed this question:

    Also, is there a way to allow for additional rows on the expense sheet?

    Make the raw data table into a "real" Excel Table. Then you can use Structured Table References rather then fixed ranges. A Table will maintain the Data Validation, formatting and formulae on new rows, whereas, a Dynamic Named Range wouldn't necessarily.

    Regards, TMS

  11. #11
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Thanks again Trevor, like I said; I wish I had your skill. Sadly, I don't know how to do this... If it's a timely process maybe I can find someone to help locally. Many thanks for all your time!

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Click somewhere in the data, select Insert | Table ... leave it with me, I'll try and have a look later.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Updated workbook.

    Regards, TMS
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Wow Trevor! This is awesome! I see one thing that I tried to correct but there's so much to this formula that I'm afraid I can't seem to find the solution... I copied the cells of B (expense categories) beyond row 73 to make room for additional entries. I also copied the cells in the remaining columns so the formulas are in there... As a test; I added a "sales Commission" as a one-time expense and it went into the correct year but when I added it as a monthly or quarterly expense starting in '15, '16, '17,' or 2018 it started the expense in 2014. It seems all the monthly expenses do this. Also, since the "Misc." category is currently a $0 I tested it as well and it doesn't seem to work, as a category - not a big deal considering how great this tool is!

    Is it OK to delete the Summary (2) and Expenses (2) sheets?

    You are amazing! Thank you so much!!

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Play with this version ...
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    On this one, the Misc. category doesn't work and monthly or quarterly expenses entered in with a date / begin date of 2015, 2016, 2017 or 2018 all start in 2014. Example: If I enter a monthly expense in June 2015, it should calculate 6 months of 2015 and 12 mos. each for 2016, 2017 & 2018. Right now, it calculates the amount multiplied by 12 months and starts back to 2014.

  17. #17
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    Back in Post #9, I said:
    Suggest you try taking out the date check part where it is Monthly or Quarterly.
    Which is what I did However, the downside of that decision that it applies monthly and quarterly values across the whole table.

    And, with regard to applying say 6 months worth of monthly payments, I'm not sure that is achievable. Same with quarterly. When is that applied? I suspect it might be possible to add more variations on the SUMPRODUCTs. For example, if the Factor is monthly and the column heading is equal to the year, multiply by (12-month). If the column heading is greater than the year, multiply by 12. So, that might be relatively easy ... take the Monthly SUMPRODUCT and have two versions of it, both with a Year comparison.

    No idea how to work out a similar version for the Quarterly option.

    I think you need to look at what is in the Summary List and check if all the options are available in the Categories List. Select cell A16 on the Expense Categories List and press F2 to go into Edit mode. What do you see? Do the same on cell A15 on the Summary sheet. Again, what do you see?

    Sorry, only so much I can do with this. It might be doable but, you'd need a way of indicating the start quarter. Or you could calculate it:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then same crack as with Monthly. Same year, Multiply by (4-Quarter). Future Years, Multiply by 4.

    Have a go at it. Good way to get your head around the formula. It's not good to use a formula you are given and not understand it ... bad news in the future!

    Regards, TMS

  18. #18
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    OK, pushing the limits here, but this seems to work

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I've also fixed the Misc. entry in the Expense Category Drop Down List (it had a trailing space)


    Regards, TMS


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    Brilliant! This is amazing! Thank you so much. Thank you! Thank you!!

  20. #20
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Category SUM by Year - Help Needed. Thanks!

    You're welcome. Thanks for the rep.

    Just couldn't walk away from it The examples I checked looked right, hope the rest are.

    I guess, if you think about it long enough, eventually you see the light.

    Enjoy!


    Regards, TMS

  21. #21
    Registered User
    Join Date
    06-22-2014
    Location
    Phoenix
    MS-Off Ver
    2010
    Posts
    10

    Re: Category SUM by Year - Help Needed. Thanks!

    I can't thank you enough! Now I just have to figure out how to copy all the "smart guy" stuff into the original sheet... I'll get to it later... Thanks again! I really appreciate all your help!

    Cheers,

    Jim

+ 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. Displaying Data By Category By Year
    By ApugalypseNow in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2014, 02:01 PM
  2. Year-over-year price increases/decreases by region and category
    By psundaram in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2013, 11:05 AM
  3. Grouping Multi-year values by category in a chart
    By jdrinnin in forum Excel General
    Replies: 4
    Last Post: 10-06-2011, 02:35 PM
  4. Help needed with cell category, ie Number/Text etc
    By Martc in forum Excel General
    Replies: 6
    Last Post: 04-18-2005, 09:06 AM
  5. Replies: 1
    Last Post: 01-05-2005, 10:06 PM

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