+ Reply to Thread
Results 1 to 7 of 7

SumProduct based on date range sheet qry column C, based on qry column E >0

  1. #1
    Registered User
    Join Date
    05-01-2020
    Location
    NY
    MS-Off Ver
    2016
    Posts
    3

    SumProduct based on date range sheet qry column C, based on qry column E >0

    Hi all,

    I'm trying to sum billing time on sheet named qry column D based on a provider sheet info A1, based on date range sheet qry column C, based on qry column E >0

    In the actual Excel book, sheet qry would have multiple months/years but I just put in April in attached

    I tried different scenarios with the function sumproduct but kept getting value as an answer. I then tried going piece by piece and stopped after I got this.

    if I sum sheet qry column d I get a total of 152.75, if I use sumproduct(qry!D:D) the total doubles.

    I have attached a workbook that cooresponds to what i am trying to do.

    Is there a specific order I have to do the array in? example =SUMPRODUCT(--(Qry!D:D),--(Qry!B:B=Info!A1)) and then tried adding in date range info-it all failed

    Thanks in advance for any assistance
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,795

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-01-2020
    Location
    NY
    MS-Off Ver
    2016
    Posts
    3

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    Thank you for Rule#1 info and for changing the title for me. I will me better next time

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    Try pasting the following into cell L2: =SUMPRODUCT((Qry!D2:D176)*(Qry!B2:B176=A1))
    To get a formula that can be dragged across row 2 change the months in row 1 to dates (format mmm), change the dates on the Qry sheet to actual dates instead of text (Text to Columns > Finish) and use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that converting the range on the Qry sheet into a table allows the formula to adjust as rows are added to the end of the table.
    You could also get results from a pivot table.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    05-01-2020
    Location
    NY
    MS-Off Ver
    2016
    Posts
    3

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    JeteMc-
    Thank you for your reply and assistance. I replicated what you suggested on my production book and it works perfect.
    I tested your suggestion by making the data I'm receiving static.
    I receive this info from a SQL linked qry, so I am asking DBA to adjust the format he is sending to me.
    I will update this thread again once I have the new linked qry but it worked perfect with static data.

    One last thing if I may- is there any a reason why you used * in the array and not -- ?

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    Unless you get very techy * and -- essentially do the same thing

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: SumProduct based on date range sheet qry column C, based on qry column E >0

    @davsth, Thank You for the explanation. I am not techy myself, * is just the way that I learned and have always written my SUMPRODUCT based formulas.
    @RHISM, You're Welcome and thank you for the feedback. If the proposal works after linking the new query, please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post.
    I hope that you both have a blessed day.

+ 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] Sumproduct with multiple variants - Help! I'm a newbie to sumproduct
    By KIGeorge in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2019, 01:21 AM
  2. Combine sumif/sumproduct or sumproduct with multiple criteria
    By sab128 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2018, 08:25 AM
  3. [SOLVED] Use sumproduct to further parse a sumproduct calculation
    By Araise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2015, 08:17 PM
  4. Count SUMPRODUCT Members / Average of SUMPRODUCT
    By Shingaru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2014, 03:59 PM
  5. Replies: 1
    Last Post: 05-19-2012, 02:54 AM
  6. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  7. Using a SumProduct Count to find a SumProduct Total?
    By XL021710 in forum Excel General
    Replies: 3
    Last Post: 02-18-2010, 08:31 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