title: Turning formula into ArrayFormula Part2
body: <p>Following on from this question
  <a href="https://stackoverflow.com/questions/56193646/turning-formula-into-arrayformula">Turning formula into ArrayFormula</a></p>
  
  <p>I failed to make it clear that the value cells may also contain multiple values in CSV format. I tried adjusting it to:</p>
  
  <pre><code>=ARRAYFORMULA(IF(LEN(A4:A), IFERROR(VLOOKUP(SPLIT(A4:A,","), 
   QUERY(TRIM(TRANSPOSE(SPLIT($B$1, ","))), 
   "select Col1,count(Col1) group by Col1", 0), 2, 0), 0), ))
  </code></pre>
  
  <p>But no luck. The test sheet is here. 
  <a href="https://docs.google.com/spreadsheets/d/12xATTwuc-e6kXn_OF2Uibg6EgtSGbInI6Q_-vueknXg/edit#gid=0" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/12xATTwuc-e6kXn_OF2Uibg6EgtSGbInI6Q_-vueknXg/edit#gid=0</a></p>
  
  <p>My original formula is in <code>B4</code> which works but needs copying down which is what I want to avoid.</p>