Apply the SUMPRODUCT formula to filtered cells

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
hi and thanks in advance!

I am using a SUMPRODUCT formula with a few conditions (works Fine)

Now I would like to apply to the same SUMPRODUCT formula, a Subtotal(9;Table1[HoursPlus])

So instead of:
  • =SUMPRODUCT(--(Table1[Employee]<>"");--(Table1[Hours]<>"");--(Table1[Hours]<=1+(Table1[Hours]>0));Table1[Hours])
I am looking for something like:
  • =SUMPRODUCT(--(Table1[Employee]<>"");--(Table1[Hours]<>"");--(Table1[Hours]<=1+(Table1[Hours]>0));--(SUBTOTAL(9;rcHorasExtrasShtHorasExtras)))
So Apply the SUMPRODUCT formula to filtered cells

Any IDEA ??
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
my guess is this, entered as an Array Formula with CNTL-SHFT-ENTR (CSE) keystroke. But, I unsure how the SUBTOTAL value will play out as that is a single value and not an array.

=SUM((Table1[Employee]<>"")*(Table1[Hours]<>"")*(Table1[Hours]<=1+(Table1[Hours]>0))*(AGGREGATE(9;5;rcHorasExtrasShtHorasExtras)))

if that does work syntax wise, all I have done is
1. make the entire formula a SUM.
2. instead of delimiting the arrays with semi-colon I am multiplying them,
and
3. changed the SUBTOTAL formula to an AGGREGATE Function that ignores hidden rows
Excel Formula:
[INDENT=2]=AGGREGATE(9;5;rcHorasExtrasShtHorasExtras)[/INDENT]
 
Upvote 0
If I apply before the first -- inside the Sumproduct
  • --(SUBTOTAL(9;OFFSET(rcSUM;ROW(rcSUM)-MIN(ROW(rcSUM));0;1)));
  • I mean apply this to the column I am trying to sum, and then take it out from the last sum product item
I get the job Done, kind of (If I have copied OK, the formula):

=SUMPRODUCT(--(SUBTOTAL(9;OFFSET(rcSUM;ROW(rcSUM)-MIN(ROW(rcSUM));0;1)));--(rcEmployee<>"");--(rcSUM<>"");--(rcSUM<=1+(rcSUM>0))))

Thanks !
 
Upvote 0
Happy you figured a solution out.
Best wishes!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top