+ Reply to Thread
Results 1 to 3 of 3

YTD & MTD running functions

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    2

    YTD & MTD running functions

    Hello

    Thanks in advance for any help. I have data on a worksheet (Sheet1) as attached and would like to calculate the following (layout on Sheet2):
    -YTD Sales for each year (as a running total)
    -MTD Sales for each year (as a running total)

    but to show by both:
    -Year on Year as being the same dates. So for example upto 09/04 of each year.
    -Year on Year as comparable dates. so for example upto 09/04/2013, 10/04/2012, 12/04/2011..... (think this would be week numbers)

    Thanks once again.

    BigAlex

    excel data.xlsx

  2. #2
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: YTD & MTD running functions

    b4 cell =SUMPRODUCT((YEAR(Sheet1!$A$2:$A$778)=Sheet2!$A4)*(Sheet1!$A$2:$A$778<=DATE(Sheet2!$A4,MONTH(Sheet2!$A$2),DAY(Sheet2!$A$2)))*Sheet1!$B$2:$B$778)

    c4 cell =SUMPRODUCT((YEAR(Sheet1!$A$2:$A$778)=Sheet2!$A4)*(MONTH(Sheet1!$A$2:$A$778)<=MONTH(Sheet2!$A$2))*Sheet1!$B$2:$B$778)

    d4 cell =IFERROR(SUMPRODUCT(((ROW(Sheet1!$A$2:$A$778)-1)<=MAX(IF((YEAR(Sheet1!$A$2:$A$778)=Sheet2!$A4)*(Sheet1!$C$2:$C$778<=WEEKNUM(Sheet2!$A$2))*WEEKDAY(Sheet1!$A$2:$A$778)=WEEKDAY($A$2),ROW(Sheet1!$A$2:$A$778)-1,"")))*((ROW(Sheet1!$A$2:$A$778)-1)>=(MATCH(DATE(A4,1,1),Sheet1!$A$2:$A$778,1)+1))*Sheet1!$B$2:$B$778),0) CSE

    e4 cell =IFERROR(SUMPRODUCT((YEAR(Sheet1!$A$2:$A$778)=Sheet2!A4)*(MONTH(Sheet1!$A$2:$A$778)<=MONTH(Sheet2!$A$2))*Sheet1!B1:B777),0)

    Please check before implementing. Especially Comperative YTD


    If everything is ok, then you may Star
    Attached Files Attached Files
    Appreciate the help? CLICK *

  3. #3
    Registered User
    Join Date
    04-09-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: YTD & MTD running functions

    Thanks for the response, but none of the formulaes work.

+ 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