+ Reply to Thread
Results 1 to 7 of 7

Dynamic Year to date formula

  1. #1
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Question Dynamic Year to date formula

    Hi all

    I have a spreadsheet with products in column A, months in column B and sales in column C.
    In column D I want to calculate the YTD sale, but just show the YTD sale in the actual month (row) we are in now.
    I try to make a formula that I can send all the way down column D, but then the formula must handle shifting products in column A.
    But I get stucked and cannot figure out how to make this work.
    See example in the attached file.

    Any ideas?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Dynamic Year to date formula

    I would solve this with an pivot table.

    See the attachment.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Re: Dynamic Year to date formula

    Thank you Oeldere

    I appreciate your suggestion. It's simple and good.
    A pivot table is a possible solution, but I am interested in a formula that can tackle my specific need in the exact table format attached.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Dynamic Year to date formula

    maybe, llike this.

    See the answer in column D (golden cells).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Re: Dynamic Year to date formula

    Thank you.
    You got me in the right direction.
    I added the if month formula to get the YTD number only in todays month
    = if(month(B2)=8;sumif($A$2:$A20;$A20;$C$2:$C20);"").
    Last edited by tomjoe; 08-25-2012 at 05:15 PM. Reason: fixing the formula

  6. #6
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Re: Dynamic Year to date formula

    Quote Originally Posted by tomjoe View Post
    Thank you.
    You got me in the right direction.
    I added the if month formula to get the YTD number only in todays month
    = if(month(B2)=8;sumif($A$2:$A20;$A20;$C$2:$C20);"").
    I made the formula completely dynamic:
    = if(month(B2)=month(today()));sumif($A$2:$A20;$A20;$C$2:$C20);"")

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Dynamic Year to date formula

    Glad I could help. Thanks for the reply.

    If the question is solved, will you mark your question as solved?

    If you have (other) questions, on this item, just ask.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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