+ Reply to Thread
Results 1 to 4 of 4

SUM, FILTER using a dynamic range to calculate Year to date (YTD) data

  1. #1
    Registered User
    Join Date
    01-29-2024
    Location
    Amsterdam
    MS-Off Ver
    365
    Posts
    24

    SUM, FILTER using a dynamic range to calculate Year to date (YTD) data

    I'm struggling with a calculation to create a dynamic range to compare data from this year and the previous year for the same months. I believe I'm using the offset function wrong, but I cannot find a solution how to accomplish this. Maybe the offset function is a bad choice to calculate the YTD data.

    The data is in columns, I know how many data is available in this year, so I need to calculate the total for the same period of the previous year. My guess was that this could be possible with OFFSET used as SUM(OFFSET(A1:A40;0;2), meaning that the calculation would be on the range A1:C40. To make things more complicated, the data must be filtered based on another column. I added the filter function for this.

    Attached is a sample file with the formula's.

    Can anyone point me in the right direction?

    Art.
    Attached Files Attached Files
    Last edited by dxfoxd; 03-27-2024 at 06:19 AM.

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: SUM, FILTER using a dynamic range to calculate Year to date (YTD) data

    Cell C5 formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C4 formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by wk9128; 03-26-2024 at 09:57 PM.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,450

    Re: SUM, FILTER using a dynamic range to calculate Year to date (YTD) data

    With 365, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by TMS; 03-26-2024 at 09:15 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-29-2024
    Location
    Amsterdam
    MS-Off Ver
    365
    Posts
    24

    Re: SUM, FILTER using a dynamic range to calculate Year to date (YTD) data

    Thx both. Never considered the TAKE function. I'm not a real fan of the indirect function, but the solution provided by Trevor is definately usable in my project.

+ 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. [SOLVED] Calculate # of months each year in a date range
    By jmilans in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-27-2023, 12:58 AM
  2. Calculate Number of weeks/months falls under each year between date range
    By dhitpit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2017, 10:06 AM
  3. How to calculate number of months by date range for a specific year?
    By redstyles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2015, 05:53 PM
  4. dynamic date range filter from cell value in vba
    By rustycanada in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2011, 06:47 PM
  5. Replies: 1
    Last Post: 07-09-2011, 03:02 AM
  6. Advanced filter a dynamic date range
    By oneandoneis2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2006, 03:57 AM

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