SUMIF Visible Range Only

hellfire45

Active Member
Joined
Jun 7, 2014
Messages
462
Hi Guys,

I realize this has been asked online before but I just can't seem to replicate it for my case. So I will explain my issue. I have a table and I need it to calculate a sumif which updates when I filter a table so that it only counts the visible range on which I have filtered.

So if I were to SUMIF the entire table unfiltered it would look like =sumif($U$16:$U$102,$Y2,$R$16:$R$102)

So I found this online and tried to replicate it using the below formula but it doesn't work:
=SUMPRODUCT(($U$16:$U$102=$Y2)+0,SUBTOTAL(109,OFFSET($R$16:$R$102,ROW($R$16:$R$102)-MIN(ROW($R$16:$R$102)),0,1,1)))

Can anybody offer a solution based on the SUMIF i entered above? And I apologize for the redundancy against the existing literature. Thank you!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
Excel Formula:
=SUMPRODUCT(SUBTOTAL(109,OFFSET($R$16,ROW($R$16:$R$102)-ROW($R$16),0)),--($U$16:$U$102=$Y2))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
sorry for the stupid question in this old thread, but I think the stupid question is that question that is not asked ... so ... what is the difference between
Excel Formula:
=SUMPRODUCT(SUBTOTAL(109,OFFSET($R$16,ROW($R$16:$R$102)-ROW($R$16),0)),--($U$16:$U$102=$Y2))
and
Excel Formula:
=SUMPRODUCT(($U$16:$U$102=$Y2)+0,SUBTOTAL(109,OFFSET($R$16:$R$102,ROW($R$16:$R$102)-MIN(ROW($R$16:$R$102)),0,1,1)))
 
Upvote 0
what's if the range is variable, instead of $R$16:$R$102 on next day range get changed to $R$16:$R$200
 
Upvote 0

Forum statistics

Threads
1,214,563
Messages
6,120,248
Members
448,952
Latest member
kjurney

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