+ Reply to Thread
Results 1 to 4 of 4

Calculate Sum of Range for current year

  1. #1
    Registered User
    Join Date
    06-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Calculate Sum of Range for current year

    Hello,

    I have an excel spread sheet to track fuel costs. I want to be able to be able to calculate the year to date total cost as well as possible the prior years cost. Is there a way to do this?

    Thanks,

    Lou

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Calculate Sum of Range for current year

    Hi and welcome to the board

    Depending on the data layout and your needs several solutions are possible.


    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Registered User
    Join Date
    06-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Calculate Sum of Range for current year

    Here is an exmple with 3 rows. My actual spread sheet is much mor complex, but if I can get it to work on this, I can make it work on my actual sheet.

    All I want to do is have a spot that says Year to date cost, and another that says previous year cost.
    Attached Files Attached Files
    Last edited by Frozen001; 08-10-2010 at 10:34 AM.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Calculate Sum of Range for current year

    One possible solution is =SUMPRODUCT((YEAR(A2:A4)=2010)*D2:D4)

    Adapt ranges as needed, but they must have the same length.

+ 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