+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT Function with Filters

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    2

    SUMPRODUCT Function with Filters

    I'm working on a budget in an Excel worksheet. I have various items with columns for Quantity (Column G), Price (Column H), Purchased (Y/N) (Column I). I've been able to create a total through the SUMPRODUCT formula that multiplies Column G with the corresponding row cell in Column H. Here is the formula I am using:

    =SUMPRODUCT(G2:G67,H2:H67)

    The first issue I'm having is that I'd like to use a filter with this worksheet. So, if I filter on a particular Item Type (Column A), the SUMPRODUCT total will change to show only the cells that show up in the filter. Any suggestions?

    The second issue I'm having is that I'd like to use the filter to calculate the total similar to above but, adding a criteria on those items that I haven't purchased yet, Column I. In Column "I", I have either a "Y" or a "N" in each cell to represent whether I've purchased it or not. I'd also like to filter the list and have this change accordingly similar to the first issue I'm having.

    Any advice would be greatly appreciated. Thanks...

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUMPRODUCT Function with Filters

    For visible rows only try

    =SUMPRODUCT(SUBTOTAL(2,OFFSET(G2,ROW(G2:G67)-ROW(G2),0)),G2:G67,H2:H67)

    and then you can add in any other criteria, e.g.

    =SUMPRODUCT(SUBTOTAL(2,OFFSET(G2,ROW(G2:G67)-ROW(G2),0)),G2:G67,H2:H67,(I2:I67="Y")+0)
    Audere est facere

  3. #3
    Registered User
    Join Date
    01-17-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: SUMPRODUCT Function with Filters

    You rock daddylonglegs! Thank you so much. I was pulling my hair out on that one, and I don't have enough to be letting any get away. Thank you so much. Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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