+ Reply to Thread
Results 1 to 2 of 2

SUMIF for dynamic range of weeks

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    ny
    MS-Off Ver
    excel 2010
    Posts
    36

    SUMIF for dynamic range of weeks

    So here is the data in the workbook attached.

    I need it to know what the first 4 weeks of selling are, which is bigger than the other weeks for product A, and B for stores going across A and B. (take note that its 1000s of products and hundreds of stores)
    So basically I need a formula smart enough to take in data from the 4 big weeks of big selling and also take in the previous little weeks of selling but disregard a fifth week of big selling for a particular store.
    So basically the sumif formula somehow needs to know an average or something and know what to add up based for the store and to disregard the and 5th big number.
    Book1.xlsx

    Thank you all in advance

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: SUMIF for dynamic range of weeks

    This seems to work...
    =SUM(OFFSET(IF(U$2="Store B",$K4,$B4),0,COUNTIFS($C$2:$S$2,U$2,$C4:$S4,">0")-1,1,-4))

    However, I dont get the logic behind including H5 in the calc?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Sumif and dynamic range
    By Bpd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2013, 01:36 AM
  2. Sumif and dynamic range
    By Bpd in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2013, 01:36 AM
  3. SUMIF Dynamic Range
    By M1234 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2013, 01:14 PM
  4. sumif with dynamic value range
    By vinayakg in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-19-2013, 09:08 AM
  5. VBA SUMIF in Dynamic Range
    By Cowzilla in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2012, 05:28 PM

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