+ Reply to Thread
Results 1 to 5 of 5

total money spent only for months in 2014

  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    48

    total money spent only for months in 2014

    Test book attached...
    I have four columns on the sheet..

    Total Cost, Duration of months, Date Ended, Average monthly cost

    Average monthly cost is total cost divided by duration of months... Easy..

    What I need to do is total how much the cost would be only for months that have happened in 2014...

    For most months, it would be as simple as month value of C column multiplied by average monthly cost. There are obviously some times where this wouldn't work, such as if the duration is shorter than the current total months of the year (IE it's July and the duration is only 3)...

    I've done a few attempts with sumifs but this is beyond me at this point.

    Any help would be greatly appreciated. I know this is a bit complicated and I'll be here to clarify any questions.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: total money spent only for months in 2014

    Are we to assume costs are equal each month to the average monthly cost?

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: total money spent only for months in 2014

    Somehow I came up short with a total of $1,232,179.01.

    I used:

    =SUMPRODUCT((IF(DATEDIF("1/1/2014"*1,F2:F30,"m")+1>B2:B30,B2:B30,DATEDIF("1/1/2014"*1,F2:F30,"m")+1))*(G2:G30))
    Attached Files Attached Files
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    11-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: total money spent only for months in 2014

    The 1.2 million math is actually correct.. The number I had in there was from something else and I forgot to delete it..

    Other than that, it does seem to work... But any way to do it without adding columns? If not I can figure something out. Only because I'm trying to print to one sheet and adding cells might throw it off.. Though I'm sure I could store them elsewhere if necessary.

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: total money spent only for months in 2014

    You don't have to add columns. They're there simply as a matter of my fact checking.

    This formula only points to your pre-existing work.

    =SUMPRODUCT((IF(DATEDIF("1/1/2014"*1,F2:F30,"m")+1>B2:B30,B2:B30,DATEDIF("1/1/2014"*1,F2:F30,"m")+1))*(G2:G30))

+ 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. Calculating total time spent by half hour
    By sublime_01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2014, 06:25 PM
  2. Replies: 3
    Last Post: 03-06-2014, 12:48 AM
  3. [SOLVED] Calculate money Spent between two dates??!!!
    By Copperspaz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-18-2013, 05:53 PM
  4. Replies: 1
    Last Post: 10-27-2011, 11:43 AM
  5. total time spent for a specific employee
    By haylnut in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-14-2007, 02:38 AM

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