convert SUMIF to SUMPRODUCT

Gilberto Fernandez

New Member
Joined
Jun 6, 2009
Messages
4
Hello,

I need to convert the following SUMIF into SUMPRODUCT so it only adds visible cells.
=SUMIF($A$12:$A$50000,A50003,$E$12:$E$50000)

Ive tried this formula with no luck:
=SUMPRODUCT(--($A$12:$A$50000=A50003),(SUBTOTAL(103,OFFSET($E$12,ROW($E$12:$E$50000)-MIN(ROW($E$12:$E$50000)),,))))


Any ideas?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Simply replace...

103

with

109

In keeping the syntax consistent with the prior one I offered...

Code:
=SUMPRODUCT(--($A$12:$A$50000=A50003),
     SUBTOTAL(109,OFFSET($E$12:$E$50000,
          ROW($E$12:$E$50000)-ROW($E$12),0,1)))
 
Upvote 0
is there a filter to get it to a visible cells subset
if so what is the filter basis?
if not how did you decide what to hide?

these filter structures could probably be added to the sumproduct
also
on the filtered view

goto an empty column az:az ???
select the column
use alt-semicolon to select visible cells
type 1 and confirm with control-shift

if you have 2007
=sumifs(E12:E50000,a12:a50000,A50003,AZ12:Az50000,1)
for 2003 sumproduct
=sumproduct((a12:a50000=A50003)*(AZ12:AZ50000=1)*E12:E50000)
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,185
Members
449,071
Latest member
cdnMech

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