help in countif formula.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have this table, wherein i wanted to have output in column3 names of those
who appears in column1 and column2

i.e.

name1 name2
jasper aileen
rd jasper
jp norman
aimee jojo
cris aimee

but as i use this formula - =if(countif(a:a,"=" & b1)>0,B1,""), this is what
happens,

name1 name2 name3
jasper aileen
rd jasper jasper
jp norman
aimee jojo
cris aimee aimee

is it possible for me to be able to line them properly at the top?
 
Put name3 in C1

Then select C2:C10, and in the formula bar enter

=IF(ISERROR(SMALL(IF(COUNTIF($A$1:$A$20,$B$1:$B$20)>0,ROW($A1:$A20),""),ROW(
$A1:$A20))),"",
INDEX($B$1:$B$20,SMALL(IF(COUNTIF($A$1:$A$20,$B$1:$B$20)>0,ROW($A1:$A20),"")
,ROW($A1:$A20))))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
That's our goal <G>

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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

Back
Top