0
votes

I'm trying to sum cell values based on an two adjacent cell values to help me organize/visualize my investment portfolio activity. I want to sum only the values in the cells under column B if the accompanying cell in column C and D meet a certain requirement.

Basically, for the values in B2:B1000, take the values for B(n) where C(n) equals "Deposit" and D(n) is equal to "Robinhood" and sum them. Below is a screenshot indicating the cells within column B that I want summed (in red) based on the criteria that meets both conditions. The below logic should give you the sum $1100.

enter image description here

I tried to at least check if C(n) equals Deposit with this line but then it just sums all of the values in column B.

=SUM(IF(C2:C1000=G2, B2:B1000, 0))

My guess is some of the cells in column C meet the condition it sums all of column B. That's the first problem. The second problem is I can't introduce the second condition without creating some sort of error.

My specific case is happening on google sheets.

1
Use SUMIFS(): =SUMIFS(B:B,C:C,"Deposit",D:D,"Robinhood")Scott Craner
one note, while it is the same in this case, most of the time it is not the same between Excel and Google. There are more differences than most know.Scott Craner
thanks so much @ScottCraner! I'm still new to google sheets and have a limited knowledge of excel. I can update the question.Matt Croak

1 Answers

1
votes

Answer

Use SUMIFS(): =SUMIFS(B:B,C:C,"Deposit",D:D,"Robinhood")