+ Reply to Thread
Results 1 to 4 of 4

Using SUMIFS within Query

  1. #1
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    Using SUMIFS within Query

    Within my workbook, the first tab is an import range of data for sales that includes: date of sale (found in column A), agent name (found in column B), price (column C)


    When using the following equation with the import data on a separate tab, the result yields 0. =SUMIFS($C$2:$C,$B$2:$B,"="&I6,$A$2:$A,">="&$K$2,$A$2:$A,"<="&$K$3)



    How can I fit the above equation into a Query Function? I would like to have the import range on the first tab with the subsequent tabs displaying the sum total of agent sales based off their name and date range.

    I6= agent name
    K2= start date range
    K3=end date range

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,076

    Re: Using SUMIFS within Query

    Hard to say without seeing any data, but from your formula, the following adjustments...
    =SUMIFS($C$2:$C--NEED_RANGE,$B$2:$B--NEED_RANGE,I6,$A$2:$A--NEED_RANGE,">="&$K$2,$A$2:$A--NEED_RANGE,"<="&$K$3)
    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

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    21,261

    Re: Using SUMIFS within Query

    @Ford,

    I've seen that used for ranges on a number of posts recently. I think it is allowed in Google sheets, but I was beginning to wonder if recent Excel versions allowed it as it has cropped up so often (and I'm stuck with XL2007 for now !!).

    Pete

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,076

    Re: Using SUMIFS within Query

    Pete, good catch on the google sheets. I run 2016 but have never tried that - will do so when I get home.

+ 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] Query on Sumifs and Countif only unique values
    By machoman4lyf in forum Excel General
    Replies: 7
    Last Post: 10-25-2018, 07:45 AM
  2. SUMIFS Query
    By SamH1984 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-10-2018, 08:37 PM
  3. [SOLVED] SUMIFS Query: Trying to create a headcount report
    By The_Snook in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-02-2015, 02:10 PM
  4. sumifs query
    By bzl in forum Excel General
    Replies: 3
    Last Post: 06-05-2015, 08:18 AM
  5. [SOLVED] Sumifs Query
    By sats43 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2014, 08:42 AM
  6. Replies: 3
    Last Post: 01-20-2012, 12:02 PM
  7. SUMIFS duplicate criteria range query
    By wesmortimer in forum Excel General
    Replies: 3
    Last Post: 01-20-2012, 09:32 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