COUNTIF

  • Thread starter Thread starter Rob
  • Start date Start date
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.
 
Rob

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


Gord Dibben MS Excel MVP
 
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
 
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
 
Back
Top