Checking A Column

Copper Contributor
So I've made the following formula
=IF(MATCH(B1,B2:B4,0),"True")
What I want to do is if it returns true I want it to compare the corresponding A column cell to A1 and only return True if they both are
So if my formula above= True because of B3 then A1 must equal A3 for it to return the true value. How should I continue the formula. I did try Vlookup but I couldnt figure out how to phrase it in a conditional way.
8 Replies

@Thomas Bryant 

Perhaps

=IFERROR(INDEX($A$2:$A$4, MATCH(B1,$B$2:$B$4,0)),"no such")
It was a help. That formula returns the respective cell value. Now to fugure out how to get it to return False if the value isn't equal to A1. Heres an edit I just tried that didn't work
=If((IFERROR(INDEX($A$2:$A$4, MATCH(B1,$B$2:$B$4,0))=A1,True,False)

@Thomas Bryant 

 

It could be

=IFERROR(INDEX($A$2:$A$4, MATCH(B1,B2:B4,0))=A1,FALSE)
I attached the file. For some reason it still returns False even though A1 & B1 should both be true
I attached the file. For some reason it still returns False even though A1 & B1 should both be true

@Thomas Bryant 

 

That's since you have "Doreen" in A1 and "Doreen " in A3. As variant it could be

=IFERROR(INDEX(TRIM($A$2:$A$4), MATCH(B1&"*",B2:B4,0))=TRIM(A1),"TRUE")

 

Two things
1) OMG THANK YOU. YOU HAVE NO IDEA HOW MUCH MY HEAD HURT TRYING TO FIGURE IT OUT
2) I can't belive the problem was an invisible space. Excel is SENSITIVE

@Thomas Bryant 

 

You are welcome. Yes, that could be not only spaces but other invisible characters, e.g. if you copy/paste from web. In most cases TRIM() and CLEAN() could help.