Need Help with formula writing

S

Soth

Hi-

I'd need a formula in colum 'C'. If the number in colum A is matched, then
sum-up the total,e.g 20 in column C; else return value in column B, e.g 5,
and 15.

A B = c
2006 10
2006 10 20
2111 5 5
2112 15 15

Regards,
Soth
 
T

T. Valko

Try this:

Entered in C1 and copied down as needed:

=IF(A1=A2,"",SUMIF(A$1:A1,A1,B$1:B1))
 
L

Luke M

In C2:
=IF(COUNTIF(A$2:A2,A2)>1,"",SUMIF(A:A,A2,B:B))

This will give you totals as the first instance of a repeated value. Note
that if your data is sorted, you might also want to look at Data -Subtotal as
a way of quickly summarizing your data.
 
S

Soth

Perfect ! Thank you Luke.

Luke M said:
In C2:
=IF(COUNTIF(A$2:A2,A2)>1,"",SUMIF(A:A,A2,B:B))

This will give you totals as the first instance of a repeated value. Note
that if your data is sorted, you might also want to look at Data -Subtotal as
a way of quickly summarizing your data.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*
 

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