excel - index match with wildcards and multiple criteria -


i have used index(match()) formulas of form before, never wildcards. explain 2 why adding in a2&"*" return error value? have checked data , there should match.

the formula below:

{=index(i1:m1000,match(1,(m1:m1000=sheet3!b1)*(i1:i1000=a2&"*"),0),2)} 

suppose a2 contains "abc".

you can put wild card in search string of match statement e.g.

match(a2&"*",i1:i1000,0) 

to search beginning abc, not in range you're searching.

also, bracket

(i1:i1000=a2&"*") 

is comparing each cell in range i1:i1000 a2&"*" in context literal match of each cell "abc*" , * doesn't work wildcard.

you try using find or search partial match or using left first few characters of strings in i1:i1000

=index(i1:m1000,match(1,(m1:m1000=b1)*(find(a2,i1:i1000)=1),0),2)  =index(i1:m1000,match(1,(m1:m1000=b1)*(left(i1:i1000,len(a2))=a2),0),2) 

you still use wildcard if re-cast formula using if statement:-

=index(i1:m1000,match(a2&"*",if(m1:m1000=b1,i1:i1000),0),2) 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -