+ Reply to Thread
Results 1 to 9 of 9

sumifs function to calculate dynamic range sum problem

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Lightbulb sumifs function to calculate dynamic range sum problem

    Hi

    I've an excel workbook which consists of summary of product category along with states and months in columns. I need Year-to-Date total based on the drop downs for month and state. I've attached the workbook wherein I need a formula to pick up the YTD total for a particular Product Category.

    It'd be great if the running total can be calculated using SUMIF but, so far, I've not succeeded in the same.

    Thanks in advance.Product Category Summary.xlsx

  2. #2
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: sumifs function to calculate dynamic range sum problem

    =sumproduct((b$4:b$12=j5)*(c$4:c$12=k$1)*(d$3:g$3=j$1)*d$4:g$12)
    Last edited by Teethless mama; 01-25-2013 at 03:15 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: sumifs function to calculate dynamic range sum problem

    Hi xs2deepak,

    Try this formula... =SUM(($B$4:$B$12=J5)*($C$4:$C$12=$K$1)*INDIRECT("$"&CHAR(67+MATCH($J$1,$D$3:$G$3,0))&"$4:$"&CHAR(67+MATCH($J$1,$D$3:$G$3,0))&"$12"))

    Note: I had to change one of your Product Categories...

    I'm attaching your sample spreadsheet...

    Let me know if you have any question...

    re-post: beautiful formula, mama!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-25-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: sumifs function to calculate dynamic range sum problem

    Perfect!!! Thanks a lot mama! and djapigo! Really appreciate these solutions.

    As I've very big original dataset with me, therefore, don't want to use Indirect (Volatile) function.

    Just wanted to know if it can be done through SUM/SUMIFS/INDEX combination.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: sumifs function to calculate dynamic range sum problem

    Oops!!

    I think the totals are not Year-To-Date. e.g. If I select Jun'12 in the drop-down, the YTD Total should give the sum of Apr'12, May'12 and Jun'12. I think this is not working out in the worksheet.

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: sumifs function to calculate dynamic range sum problem

    for YTD, in K5 and down:

    =SUMPRODUCT(($D$4:$G$12)*($C$4:$C$12=$K$1)*($B$4:$B$12=$J5)*($D$3:$G$3<=$J$1))
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: sumifs function to calculate dynamic range sum problem

    Try it like this...

    =SUMPRODUCT((B$4:B$12=J5)*(C$4:C$12=K$1)*D$4:INDEX(D$4:G$12,,MATCH(J$1,D$3:G$3,0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    01-25-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: sumifs function to calculate dynamic range sum problem

    Many thanks Toni! & icestationzbra! Works perfectly!!! Appreciate these!!!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: sumifs function to calculate dynamic range sum problem

    You're welcome. Thanks for the feedback!

+ 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