Quote Originally Posted by Aflatoon View Post
Maybe. And maybe I've already seen too many "woohoo" posts about this from MVPs, when I suspect 99.8% of Excel users will never use these functions. Trying to explain character classes, greediness vs laziness, back references and subgroups to your average office worker is not something I look forward to. It'll be even worse than the time I tried to explain Xpath usage in FILTERXML...

Maybe I've been on forums too long - I think I'm starting to sound like Bob on a particularly grumpy day.

FWIW, I agree. WS formulas like this are impressive and done by someone who really knows their stuff, but are practially unmaintainable by the average person (like me who can never get all the )'s in the right places)

=LET(HeaderMatch1,MATCH(E1,StockTable___2[#Headers],0),
HeaderMatch2,MATCH(E2,StockTable___2[#Headers],0),
ForHeaders,TOROW(MATCH(D5:K5,StockTable___2[#Headers],0),2),
Filt1,CHOOSECOLS(FILTER(StockTable___2,(ISNUMBER(SEARCH("*"&G1&"*",INDEX(StockTable___2,,HeaderMatch1))))+(ISNUMBER(SEARCH("*"&G2&"*",INDEX(StockTable___2,,HeaderMatch1))))),ForHeaders),
Filt2,CHOOSECOLS(FILTER(StockTable___2,(ISNUMBER(SEARCH("*"&G1&"*",INDEX(StockTable___2,,HeaderMatch2))))+(ISNUMBER(SEARCH("*"&G2&"*",INDEX(StockTable___2,,HeaderMatch2))))),ForHeaders),
IF(COUNTA(E1:E2)=0,"No Search Columns",IF(AND(E1<>"",E2=""),Filt1,IF(AND(E2<>"",E1=""),Filt2,VSTACK(Filt1,Filt2)))))
I wonder if they work with dynamic array functions?