+ Reply to Thread
Results 1 to 5 of 5

Horizontal sum of dynamic column range based on multiple criterias

  1. #1
    Registered User
    Join Date
    07-01-2020
    Location
    Switzerland
    MS-Off Ver
    MS 2013
    Posts
    2

    Horizontal sum of dynamic column range based on multiple criterias

    Hi all,

    i am currently struggling a bit with the following problem:

    My Dataset:



    Type Division Name Jan Feb Mar
    a D Joe 10 15 16
    b D Alex 11 14 30


    I have monthly data for the past 3 years and up to May 2020 with 3 criterias (Type, Division, Name) in the above format. The months start in Jan17 and go up to May20. I would like to calculate the sum of a range of months (Jan till X) for a given year and for specific 3 criterias, in order to compare the intrayear progress throughout the periods. I started using a Sumproduct formula like: +sumproduct((Type="a")*(Division="D")*(Name="Alex");Offset(....))

    The offset selects the same number of rows for Jan of Year X up until the chosen Month of Year X.

    Nevertheless, the sumpoduct does not work and gives me a Value error.

    Any ideas how to solve the above in anyway would be greatly appreciated.

    Cheers
    nf
    Attached Files Attached Files
    Last edited by nf23; 07-01-2020 at 05:14 AM. Reason: Excel Sample

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Horizontal sum of dynamic column range based on multiple criterias

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Horizontal sum of dynamic column range based on multiple criterias

    So you have 4 criteria, with month is the fourth
    Like this:
    Please Login or Register  to view this content.
    With date range is every 1st date of month, can be formatted as "mm/yyyy" or "mmm-yy" whichever you want.
    Attached Images Attached Images
    Quang PT

  4. #4
    Registered User
    Join Date
    07-01-2020
    Location
    Switzerland
    MS-Off Ver
    MS 2013
    Posts
    2

    Re: Horizontal sum of dynamic column range based on multiple criterias

    Thanks a lot for that.

    It works perfectly and is a way easier approach than what I initially had in mind.

    Cheers
    nf

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Horizontal sum of dynamic column range based on multiple criterias

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. dynamic filtering of data with multiple criterias
    By Agreth in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2017, 04:31 PM
  2. Horizontal Index Match (Hlookup multiple criterias)
    By eyeope in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2017, 05:13 AM
  3. Finding a specific value based on vertical & horizontal criterias
    By agadge123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-08-2016, 03:40 PM
  4. Need to define dynamic range for column I to K based on dynamic column A
    By flabb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-19-2015, 10:19 AM
  5. Count items in a column based on multiple criterias
    By cgonzo1970 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2014, 04:27 PM
  6. [SOLVED] dynamic range specification (based on column header) in sumproduct multiple condition
    By anand_erin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-28-2012, 10:16 PM
  7. [SOLVED] Dynamic Named Range Help - Range Based on Values in Column
    By Filibuster in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-03-2012, 11:13 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