sum per group

A

Are

Dear Masters,

An body can help me for using sumproduct() per each group.
for example

| A B C
-------------
1| P 2 14
2| 5
3| 7
4|
5| P 3 7
6| 1
7| 1
8| 2

want result in column C1 and C5 is automatically if I sort in column A equal
P, and using some formula in C1 and C5

Thanks in advance
 
J

Jacob Skaria

Try the below formula in C1/c5. Please note that this is an array formula.
Within the cell in edit mode (F2) paste this formula and press
Ctrl+Shift+Enter to apply this formula. If successful in 'Formula Bar' you
can notice the curly braces at both ends like "{=<formula>}"

=SUM(INDIRECT("B"&ROW(B1)&":B"&ROW(INDEX(B1:B$1000,MATCH(1,--(B1:B$1000=""),0)))-1))

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top