Search code examples
arraysgoogle-sheetsimportarray-formulastextjoin

Difficulties using ArrayFormula


I am trying to use ArrayFormula to populate row data. I have the following formula that work perfect when I drag down, however I am unable to figure out how I should adapt it to work with ArrayFormula.

Equation to populate data in each row where I changed U2 to U2:U for use with ArrayFormula:

=IF(HOME!U2:U<>"",TRANSPOSE(IMPORTXML(LEFT(HOME!U2:U,FIND("#",SUBSTITUTE(HOME!U2:U,"/","#",4))-1),"//strong[@data-e2e='video-views']")),"")

And this is the corresponding error when I use it with ArrayFormula ("Function FIND parameter 2 value should be non-empty. "):

2nd equation error

Appreciate any help I can get with this, thanks!


Solution

  • IMPORTXML is not supported under ARRAYFORMULA. you will need to stick to a per-row solution.