sumproduct and subtotal in the same formula

Jerickson

New Member
Joined
May 19, 2009
Messages
4
Hey everyone, Im trying to figure out a formula. I really like the function sumproduct((a1:a24=a27)*(b1:b24)) reason I like it is because it only sums the information that I want. I want to go a step further and add subtotal to the mix.

I want a functioning formula like sumproduct((a1:a24=a27)*(subtotal(9,b1:24))

I have tried alot of variations to this and it still will not function. Reason I want this to work is so I can filter down my table even further to say the date. Im working on a very large tracking worksheet that I have pasted below.

Any advice would be great.

Thanks

http://img530.imageshack.us/my.php?image=sumscreenshot.jpg
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hey everyone, Im trying to figure out a formula. I really like the function sumproduct((a1:a24=a27)*(b1:b24)) reason I like it is because it only sums the information that I want. I want to go a step further and add subtotal to the mix.

I want a functioning formula like sumproduct((a1:a24=a27)*(subtotal(9,b1:24))

I have tried alot of variations to this and it still will not function. Reason I want this to work is so I can filter down my table even further to say the date. Im working on a very large tracking worksheet that I have pasted below.

Any advice would be great.

Thanks

http://img530.imageshack.us/my.php?image=sumscreenshot.jpg

Try...

=SUMPRODUCT(SUBTOTAL(9,OFFSET(B2:B24,ROW(B2:B24)-ROW(B2),,1)),--(A2:A24=A27))

The formula assumes that A1:B1 houses the relevant headers. Adjust the ranges to suit.
 
Upvote 0
Try...

=SUMPRODUCT(SUBTOTAL(9,OFFSET(B2:B24,ROW(B2:B24)-ROW(B2),,1)),--(A2:A24=A27))

The formula assumes that A1:B1 houses the relevant headers. Adjust the ranges to suit.


I dont mean to be a pest. But I really love learning. I understand most of the formula above except for the -- part is that minus the negative if so could you just use + or is it something in excel that is a secret trick.

Thanks
 
Upvote 0
I dont mean to be a pest. But I really love learning. I understand most of the formula above except for the -- part is that minus the negative if so could you just use + or is it something in excel that is a secret trick.

Thanks

It effects the so-called coercion, which we need in a SumProduct formula with the conditional terms like the last part in the formula i question. See also:

http://www.mrexcel.com/forum/showthread.php?t=70547

http://www.mrexcel.com/forum/showthread.php?t=128907
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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