+ Reply to Thread
Results 1 to 6 of 6

2 Way Sumifs with range

  1. #1
    Registered User
    Join Date
    11-21-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    2 Way Sumifs with range

    Hi

    I have a database that has products codes and product types vertically but week numbers horizontally. I want to be able to see, using a lookup cell, how many products sold between a certain range of weeks. I have been able to use a SUmIFS index Match to do the product type and single week but I cannot do the weekly range.

    So for example how many DRAWS sold between Week 1 and week 3 where I can change the week with a lookup cell

    FIle photo.PNG
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: 2 Way Sumifs with range

    I think you would need to use SUMPRODUCT given fact your criteria range & summation range are not of the same dimensions... so using your example:

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

    note: A1 would need to be changed from <3 to 3.

  3. #3
    Registered User
    Join Date
    11-21-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Re: 2 Way Sumifs with range

    Hi, that sort of works but to get a range I have to go into the formula and make the change, and the formula is < (less than)

    How could I incorporate a range of weeks Week 3 to Week 5

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: 2 Way Sumifs with range

    have a start week cell, and end week cell then add the additional parameter to the SUMPRODUCT - e.g.:

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


    where A1 is week from {inclusive}, and B1 is week to {inclusive} -- this would give you max flexibility.

    in terms of range definition, you can use a Dynamic Named Range (which you should anyway if your dataset is large, even with SUMIFS etc), e.g.

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


    above would create range from C3 to XY where X is last column with # in row 3, and Y is last row of text in Column C

    Your SUMPRODUCT can be adapted, based on your sample data types, to :

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


    in terms of using >3 as an entry value... this type of construct is really for use with COUNTIFS/SUMIFS etc - so, not really applicable... you can use it but you'd have to fudge the resulting function to strip out / evaluate the string which is really not worthwhile.


    EDIT: I had a typo in the _Data SUMPRODUCT -- first criteria should have referenced column 1 rather than 3, corrected above, apologies for confusion !
    Last edited by XLent; 01-29-2019 at 01:41 PM.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: 2 Way Sumifs with range

    Hello sd444. Welcome to the forum.

    Edited Corrected mistake in formula.

    With the week numbers in C1:D1 and the Type in B1 this in A1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This assumes the Types are grouped as in your 1st post.


    A
    B
    C
    D
    E
    F
    G
    H
    1
    1137
    Draw
    1
    3
    2
    3
    Type
    Code
    1
    2
    3
    4
    4
    Draw
    83
    115
    153
    209
    5
    Draw
    95
    133
    119
    23
    6
    Draw
    197
    154
    88
    22
    7
    Cabinet
    124
    42
    58
    220
    8
    Cabinet
    132
    144
    15
    204
    9
    Cabinet
    123
    132
    28
    154
    Last edited by FlameRetired; 01-29-2019 at 10:11 PM. Reason: correction in formula
    Dave

  6. #6
    Registered User
    Join Date
    11-21-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Re: 2 Way Sumifs with range

    FlameRetired Thank you so much! I have been trying to get the solution to this for ages and you solved it in minutes!

+ 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] SUMIFS in a range
    By marianacollier in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2018, 04:49 AM
  2. Sumifs in a range
    By psychogr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2017, 01:33 PM
  3. SUMIFS - Across Date Range, Time Range, and by City
    By awilliams8976 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2016, 06:51 PM
  4. [SOLVED] Dynamic range sumifs
    By eggselent in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-24-2016, 12:53 PM
  5. sumifs VBA big range
    By andre1986 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-29-2016, 06:31 AM
  6. [SOLVED] Macro for SumIfs in each Range
    By zoenightshade in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2015, 09:12 PM
  7. sumifs on a pivot table - compare range with range
    By pavlos in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 02:26 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