+ Reply to Thread
Results 1 to 6 of 6

Sumproduct visible cells

Hybrid View

Even Sumproduct visible cells 03-25-2013, 10:05 AM
daddylonglegs Re: Sumproduct visible cells 03-25-2013, 10:20 AM
Even Re: Sumproduct visible cells 03-25-2013, 04:06 PM
ChemistB Re: Sumproduct visible cells 03-25-2013, 11:33 AM
Even Re: Sumproduct visible cells 03-25-2013, 12:19 PM
daddylonglegs Re: Sumproduct visible cells 03-25-2013, 04:13 PM
  1. #1
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Sumproduct visible cells

    Hi, I am trying to sum visible cells within a specified range. I have been searching the Internet, but can't find what I am looking for. I want to sum the premium that is in a specified time period. The time periods are July 1st to June 30th every year. So within these periods I want to sum the premium for the each product that is chosen (I am using filter). The formula I have sums everything, but what I need is to sum only the visible cells. I hope somebody can help me.

    Here is the formula: =SUMPRODUCT(--(INT($A$2:$A$1360)>=E8);--(INT($A$2:$A$1360)<=F8);--($A$2:$A$1360))
    Attached Files Attached Files

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

    Re: Sumproduct visible cells

    I had to convert your dates in column A but I think that's a regional thing - assuming valid dates try this formula in G3 copied down to sum only visible premiums within the date period

    =SUMPRODUCT((A$2:A$1360>=E3)*(A$2:A$1360<=F3),SUBTOTAL(9,OFFSET(B2,ROW(B$2:B$1360)-ROW(B$2),0)))
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Re: Sumproduct visible cells

    I was thinking, while I am on the subject, if it is possible to sum the premium for each product like in the columns I, J and K in the attached example. Might be a complete different thread though.
    Attached Files Attached Files
    Last edited by Even; 03-25-2013 at 04:08 PM.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sumproduct visible cells

    I did something similar to DDL but used a dummy column (D) This column can be hidden after setup.

    D17 (I moved everything down so your table doesn't disappear when you filter) copied down contains
    =SUBTOTAL(3,C17)
    This formula will equal 0 when filtered.

    Then the formula is something like
    =SUMPRODUCT(--(INT($A$8:$A$1366)>=F2),--(INT($A$8:$A$1366)<=G2),--($B$8:$B$1366), --($D$8:$D$1366>0))
    Attached Files Attached Files
    Last edited by ChemistB; 03-25-2013 at 11:43 AM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Re: Sumproduct visible cells

    Fantastic - thanks daddylonglegs and ChemistB!!!

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,726

    Re: Sumproduct visible cells

    Do you want to sum all cells or still only visible ones? If it's the former you can use SUMIFS like thisin I2 copied across and down:

    =SUMIFS($B:$B,$A:$A,">="&$F2,$A:$A,"<="&$G2,$C:$C,I$1)

+ 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