+ Reply to Thread
Results 1 to 8 of 8

Tracking Expenses While Sorting

  1. #1
    Registered User
    Join Date
    05-23-2017
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    16

    Tracking Expenses While Sorting

    Hello. I'm trying to make a spreadsheet that tracks our expenses by category and quarter. Right now I update the costs manually with the sum formula, after sorting by category and date, but if I ever need to sort the sheet differently all of the sums get mixed up. Is there a way to track the costs by category and date regardless of how it gets sorted afterwards?

    To clarify, if we make a supplies purchase in Q1 for $50 and another in Q2 for $100, I need the total in my grid at the bottom to show "Supplies: $150" for the year but still list the costs per quarter separately.

    I've attached a sample workbook (I hope I did it correctly). If it helps, our quarters are Q1: Oct-Dec, Q2: Jan-Mar, Q3: Apr-Jun, Q4: Jul-Sep.

    Thank you!
    Attached Files Attached Files
    Last edited by TSCworkhelp; 02-08-2018 at 05:40 PM.

  2. #2
    Registered User
    Join Date
    02-08-2018
    Location
    Dublin, Ohio
    MS-Off Ver
    365
    Posts
    1

    Re: Tracking Expenses While Sorting

    Hi - have you tried using a SUMIF formula to keep track of spending for each quarter? You may need to add a column based on the date to define which dates belong to which quarter, but that should keep the quarters and the overall total correct regardless of order.
    www.conquerexcel.com

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Tracking Expenses While Sorting

    maybe this one with PivotTable
    [EDIT:] or with custom defined quarters (PowerQuery and PivotTable)
    Attached Files Attached Files
    Last edited by sandy666; 02-08-2018 at 10:50 PM. Reason: see edit

  4. #4
    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: Tracking Expenses While Sorting

    Edited Had whole column references. Did not notice table below data.

    our quarters are Q1: Oct-Dec, Q2: Jan-Mar, Q3: Apr-Jun, Q4: Jul-Sep.
    With that in mind find this formula in helper column H.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then this summary table in J:0 and this formula K2:O5
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    J
    K
    L
    M
    N
    O
    1
    Qrts
    Additional Training
    Local Travel Expenses
    Advisory Board
    Printing
    Office Supplies
    2
    1
    145
    192.96
    304.95
    140.99
    260.47
    3
    2
    0
    0
    0
    0
    611
    4
    3
    0
    0
    0
    0
    0
    5
    4
    0
    0
    0
    0
    0
    6
    Year Totals →
    145
    192.96
    304.95
    140.99
    871.47
    Attached Files Attached Files
    Last edited by FlameRetired; 02-08-2018 at 11:26 PM.
    Dave

  5. #5
    Registered User
    Join Date
    02-02-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Tracking Expenses While Sorting

    I think SUMPRODUCT may help you with this. Please see the attached file.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-23-2017
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    16

    Re: Tracking Expenses While Sorting

    Wow, these are fantastic! Thank you!! I need to significantly improve my Excel skills overall, so I'll be playing with all of it to figure out how it was done and which would be best to move forward with.

    @FlameRetired: What are the 8 numbers referring to at the end of this formula? =LOOKUP(MONTH(F18),{1,4,7,10},{2,3,4,1})

    Thanks again, I really appreciate it

  7. #7
    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: Tracking Expenses While Sorting

    What are the 8 numbers referring to at the end of this formula? =LOOKUP(MONTH(F18),{1,4,7,10},{2,3,4,1})
    They are the lookup_vector and [result_vector].

    LOOKUP(lookup_value, lookup_vector, [result_vector])

    LOOKUP finds the nearest match less than or equal to the number that MONTH returns. It then finds the value in the [result_vector] (quarter) corresponding to that match.

    Since the 1st quarter begins in Oct (10th month) one is assigned the last position in the [result_vector] (the quarters). The others correspond accordingly.

    Did that help?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Last edited by FlameRetired; 02-09-2018 at 04:18 PM.

  8. #8
    Registered User
    Join Date
    05-23-2017
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    16

    Re: Tracking Expenses While Sorting

    Yes, that makes sense and I understand how it was written now.

    In order to upload a sample workbook I had to edit/delete a lot of financial information, but unfortunately I deleted full columns in the process, so I need to try recreating what you did. It will certainly be good practice for me. Thank you all very much for your help!

+ 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. Personal expenses calculator template sorting
    By karim.zheng in forum Excel General
    Replies: 1
    Last Post: 08-24-2015, 10:03 AM
  2. income/expenses tracking issue
    By ibrahimyunus in forum Excel General
    Replies: 6
    Last Post: 06-03-2013, 07:10 PM
  3. [SOLVED] Sorting Master Database & Tracking Contact Dates
    By adawg in forum Excel General
    Replies: 3
    Last Post: 04-25-2012, 06:50 PM
  4. Replies: 0
    Last Post: 04-04-2006, 07:45 AM
  5. [SOLVED] Is there a spreadsheet for tracking investment property expenses?
    By new landlord in forum Excel General
    Replies: 1
    Last Post: 03-12-2006, 12:50 AM
  6. [SOLVED] Template for tracking monthly business expenses
    By lkeller in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-31-2005, 12:05 AM
  7. tracking expenses
    By Christian in forum Excel General
    Replies: 1
    Last Post: 08-17-2005, 09:05 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