Forum Discussion
fhceq
Jan 24, 2022Copper Contributor
Sum by group excel (non-vba nor power query)
Please, I want to sum by group, however I have some conditions. For exemple: I have different fruits divided in groups (1 to 5) in Table 1. In Table 2, I have the quantity of some fruits that are...
- Jan 24, 2022
Another variation I think will work:
=SUM((Table1[Groups]=[@Group])*(Table1[Fruits]=TRANSPOSE(Table2[Fruit]))*TRANSPOSE(Table2[Qty]))
OliverScheurich
Jan 24, 2022Gold Contributor
=SUM(IF($A$3:$A$15=G3,MMULT(--($B$3:$B$15=TRANSPOSE($D$3:$D$10)),$E$3:$E$10)))
An alternative could be above formula as shown in the attached file. Enter formula with ctrl+shift+enter if you don't work with Office365 or 2021.
fhceq
Jan 26, 2022Copper Contributor
OliverScheurich, thank you so much!
Your solution helped me a lot!
Your solution helped me a lot!