COUNTIF

R

Rob

If I have a value in one cell

can i use COUNTIF to add the sum in another range of cells?

i.e
value =2 in cell A1
then add the values in B1:B5

The COUNTIF would be used in C1

Many Thanks
Rob.
 
G

Gord Dibben

Rob

In C1........=IF(A1=2,SUM(B1:B5),"A2 does not equal 2")


Gord Dibben MS Excel MVP
 
R

Rob

Thanks Mr Dibben
But have now figured it out using

=IF(A1>0,SUM($B$1:B5),"")

which is close to your reply.

Thanks
Rob
 
G

Gord Dibben

Thanks for the feedback.

Gord

Thanks Mr Dibben
But have now figured it out using

=IF(A1>0,SUM($B$1:B5),"")

which is close to your reply.

Thanks
Rob

Gord Dibben MS Excel MVP
 

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