+ Reply to Thread
Results 1 to 5 of 5

Dynamic SUMIF formula help please

  1. #1
    Registered User
    Join Date
    08-08-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    Dynamic SUMIF formula help please

    Hello All

    New member here.

    I've been struggling trying to get a formula to work for me so I thought I would turn to you pros for some help. My novice/Intermediate skills seem to be tapped out at this point.

    In the attached file you will see that I am trying to get a SUMIF formula to change sum ranges based on a column header ie. =SUMIF(Sheet2!$A$2:$A$15,Sheet1!$A2,Change based on Sheet1 column header). Ideally I would be able to copy the formulas in the week end date columns to each other without having to manually change the sumif range column each time I get to a new fiscal month/quarter/year.

    The example I have attached is rough but is a snipit of the big picture. Sheet1 is a summary sheet that shows hours by resource code by week end date, fiscal month, fiscal quarter, and fiscal year. With Sheet2 being the raw data table. As you can see Sheet2 has multiple repeated resource codes thus the summary of each resource code on Sheet1.

    I apologize if my above question is not clear so please let me know if more detail is needed for you to help.

    Thank you very much in advance.Sumif Example.xlsx
    Last edited by j2mbs1655; 08-08-2013 at 01:05 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dynamic SUMIF formula help please

    Do you mean?

    =SUMIF(Sheet2!$A$2:$A$15,Sheet1!$A2,INDEX(Sheet2!$B$2:$N$15,0,MATCH(B$1,Sheet2!$B$1:$N$1,0)))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Dynamic SUMIF formula help please

    Are you looking to get the sum for EX1 for 9/24/2013 in sheet1 from the 9/24/2013 column in sheet 2?
    if so this will work.
    =SUM(SUMIF(Sheet2!$A:$A,Sheet1!$A$2:$A$11,Sheet2!B:B))
    then drag down and across.
    Last edited by Sam Capricci; 08-08-2013 at 01:42 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    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,445

    Re: Dynamic SUMIF formula help please

    Assuming that all the date columns match:

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


    Copy across and down.

    I used SUMIFS because I thought I might do something more complex, and didn't. so you could just use SUMIF if you want.

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


    You might do yourself a favour and move all the calculated quarterly columns to the end (right hand side). Then you can just drag the formulae across.

    I don't think having them in the middle helps the reader particularly, unless you plan to group them ... but it'd still be easier to view the quarterly summary if the columns are together.


    Regards, TMS
    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


  5. #5
    Registered User
    Join Date
    08-08-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dynamic SUMIF formula help please

    NBVC you rock!!

    Works like a charm.

    Thank you everyone for your input.

+ 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. make a sumif formula dynamic
    By amartino44 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-08-2013, 11:19 AM
  2. VBA SUMIF in Dynamic Range
    By Cowzilla in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2012, 05:28 PM
  3. [SOLVED] SUMIF formula with dynamic column? HLOOKUP?
    By jrvstl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-01-2012, 12:04 AM
  4. Dynamic SUMIF in VBA
    By sooperdaveinva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2011, 10:57 PM
  5. Dynamic Sumif
    By excelhelp18 in forum Excel General
    Replies: 2
    Last Post: 09-24-2010, 08:16 AM

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