excel - How to vlookup each comma separated value in one cell? -


i have worksheet a:

a

i have worksheet (ws) b:

enter image description here

what want:
wanna use vlookup formula @ cell c3 formula this:

=vlookup(b2,b!a2:b3,2,false) 

however:
don't know how make look multiple comma separated values (csv) in 1 cell (note there cells can go 10 csv)

logic wise, cell c3 of ws should :

  • lookup value b2
  • from table array of ws b
  • looping through cell a2 of ws b, should check "1-abc", "2-abc", "3-abc".
  • since finds match @ "3-abc" c3 return unique acc id @ b2 of ws b
  • then can drag down formula many many records...

can done using formula or better via vba? if vba, how can this?

you can use asterisks wildcard that

=vlookup("*" & b2 & "*",b!a2:b3,2,false) 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -