Search code examples
excelstringindexingmatchformula

Extract a List of Values from an HTML string Based on a List of Cell Values


I have an export of our blog, and I'm trying to see which SKUs where listed in that blog post. I have a list of SKUs and the Blog Content in a spreadsheet. I need to figure out how to get all the SKUs in the content, into a cell next to the blog content.

I have a small sample available here: https://www.dropbox.com/s/nf12vo66nwndpao/test-doc-v001.xlsx?dl=1

I've tried using an index/match and including a 'search' within that, but I think I might need something more. I think an index/match might only pull the 'first' SKU that it finds.

Any help is very much appreciated. Thanks!


Solution

  • If you create an array that checks for numeric responses using the Find function and joint them with Textjoin, you should get what you want. You may have to enter CTL shift enter when entering this formula if you don't have spill range. Sample file here (view it in browser for best results).

    =TEXTJOIN(",",TRUE,FILTER(A:A,(ISNUMBER(FIND(A:A,$E$2)))))
    

    enter image description here