Excel Question

  • Thread starter Thread starter alish
  • Start date Start date
A

alish

All,

I need your help: Please see below:
line1: 1
line2: 1
line3: 1
line4: 2

result: 2

I want the result to show if the any lines (cells) of the above cells
contain 2, if not nothing.

Thanks in advance.
 
Hi,

You could use COUTNIF

Assume your numbers (1 & 2) are in range B2:B10 in B11 enter
=COUNTIF(B2:B10,"2")

Hope this helps,

Gav.
 
That will return the COUNT of rows containing 2's. If you want to display the
number 2 if ANY row in the range contains a 2, do this:

=IF(COUNTIF(B1:B10,2)>0,2,"")
 

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

Similar Threads


Back
Top