Forum Discussion
Evangeline_Leakes
Aug 09, 2022Copper Contributor
Formula to Sum Column referencing another Column based on Criteria
I am trying to sum the values of one column by referencing another column that has repetitive criteria (similar to a Pivot but with a formula instead). For example, in column A "MGMTCO001" is lis...
mathetes
Aug 09, 2022Silver Contributor
- Evangeline_LeakesAug 09, 2022Copper Contributor
mathetes Thanks for the quick response! I tried the SUMIF formula actually, but it doesn't quite for me because I have to specifically mention a criteria ("MGMTCO001" in this case). The criteria in column A can change so I need a way to tell excel to get the sum anytime various values appear.
- Riny_van_EekelenAug 09, 2022Platinum Contributor
If you are on a recent Excel version that supports dynamic arrays, enter this in R8:
=SUMIF(A8:A15,A8:A15,P8:P15)
Just make sure that the cells below are empty.
Otherwise, a simple SUMIF will do just fine, as mathetes suggested. Enter this in R8 and copy it down.
=SUMIF($A$8:$A$15,A8,$P$8:$P$15)
Although it works just fine, there is no real need for SUMIFS and/or a LAMBDA function.