Filtering Data

spookykid

New Member
Joined
May 5, 2019
Messages
5
I created these formulas on a separate sheet and I need help with changing it so when the source sheet is filtered it only shows what is filtered and not all the data, any help would be greatly appreciated!

=SUMIFS(OT_COMP!I2:I1048576,OT_COMP!B2:B1048576,"OT",OT_COMP!E2:E1048576,"Place Holder")

=SUMIFS(OT_COMP!I2:I1048576,OT_COMP!B2:B1048576,"OT",OT_COMP!E2:E1048576,"Place Holder",OT_COMP!C2:C1048576,"180")
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Re: Help With Filtering Data

Hi
Welcome to the board

For the first one:

=SUMPRODUCT(--(OT_COMP!B2:B1048576="OT"),--(OT_COMP!E2:E1048576="Place Holder"),SUBTOTAL(9,OFFSET(OT_COMP!I2,ROW(OT_COMP!I2:I1048576)-ROW(OT_COMP!I2),)))

Test and adapt for the other.
 
Upvote 0
Re: Help With Filtering Data

How about

=SUMPRODUCT(SUBTOTAL(9,OFFSET(OT_COMP!$I$2,ROW(OT_COMP!$I$2:$I$1000)-ROW(OT_COMP!$I$2),,1))*(OT_COMP!$B$2:$B$1000="OT")*(OT_COMP!$E$2:E1000="Place Holder"))

And

=SUMPRODUCT(SUBTOTAL(9,OFFSET(OT_COMP!$I$2,ROW(OT_COMP!$I$2:$I$1000)-ROW(OT_COMP!$I$2),,1))*(OT_COMP!$B$2:$B$1000="OT")*(OT_COMP!$E$2:E1000="Place Holder")*(OT_COMP!$C$2:$C$1000="180"))
 
Upvote 0
Re: Help With Filtering Data

I could get that one to work, but not the part adding the 180 to it, not sure where to actually put it in the formula, tried to put it before the subtotal, but not sure if I did it right or not.
 
Upvote 0
Re: Help With Filtering Data

I could get that one to work, but not the part adding the 180 to it, not sure where to actually put it in the formula, tried to put it before the subtotal, but not sure if I did it right or not.

You tried it with the second formula of post#3
 
Upvote 0
Re: Help With Filtering Data

yeah neither of the ones with the number in them would pull the info right, just returned a 0
 
Upvote 0
Re: Help With Filtering Data

Hi

For the second one you just need to add a new condition:

=SUMPRODUCT(--(OT_COMP!B2:B1048576="OT"),--(OT_COMP!E2:E1048576="Place Holder"),--(OT_COMP!C2:C1048576=180),SUBTOTAL(9,OFFSET(OT_COMP!I2,ROW(OT_COMP!I2:I1048576)-ROW(OT_COMP!I2),)))

Remark: if the 180 is a text value use instead

...,--(OT_COMP!C2:C1048576="180"),...
 
Upvote 0
Re: Help With Filtering Data

P. S.

In this case my formulas and Dante Amor formulas are equivalent.
 
Upvote 0
Re: Help With Filtering Data

=SUMPRODUCT(SUBTOTAL(9,OFFSET(OT_COMP!$I$2,ROW(OT_COMP!$I$2:$I$8000)-ROW(OT_COMP!$I$2),,1))*(OT_COMP!$B$2:$B$8000="OT")*(OT_COMP!$E$2:E8000="Place Holder")*(OT_COMP!C2:C8000=180))

How would I exclude 180? I tried "<>180" but it doesn't work
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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