0

I have the following layout of column A and B and I need a formula to calculate values in column C:

A     B     C
1     10    70
1     20    
1     10    
1     30
2     10    30
2     15   
2     5
3     20    25
3     2
3     3

Any ideas or functions which can do this? Basically Sum column B for unique values of column A

1 Answer 1

3

In C1 enter:

=SUMIF(A:A,A1,B:B)

and in C2 enter:

=IF(A1=A2,"",SUMIF(A:A,A2,B:B))

and copy down:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I forgot all about the SUMIF function and was trying to just use some combination of SUM and IF. It was getting too messy.
Hi @AlastorMoody We take advantage of the fact that your data is already well-organized..............column A appears already sorted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.