formula help

A

Araseli

hello,
I have
A B C B E
1 c 100 90 c
2 c 100 100 b
3 d 200 80 f
4 d 100 90 d
total

I need a formula that will add column B and column C only if columns A & B
are the same.

Thanks!
 
J

JBeaucaire

I wasn't sure if you're asking for one global answer, or line by line
calculations, so here's both.

To get row 1 to do a simple test, put this in E1 and copy down:
=IF(A1=D1,B1+C1)

To get one answer for the whole table in one cell without the formula above
helping, put this formula down below somewhere:

=SUMPRODUCT((A1:A4=D1:D4)*(B1:B4+C1:C4))

Expand the ranges as needed, but make sure they're all the same size.
 
A

Araseli

Thank you so much for your help!
i actually needed to total the columns. I rec'd my anser from another post
 
A

Araseli

I actually used the one for the whole table and that worked!
Thank you sooo much!

I have another Q:
If i need to have a count for the columns where A & D are the same which
formula should is use?
 

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