We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged


You can try =switch : =SWITCH(A1:A10,"A",0,"B",1,"C",2) Result : Same result with regexmatch : =ArrayFormula( if(REGEXMATCH(A1:A10,"A"),0, if(REGEXMATCH(A1:A10,"B"),1, if(REGEXMATCH(A1:A10,"C"),2,"no match"))) )


You have the basic concept right just piece it together step by step. This does the job: =REGEXREPLACE(JOIN(" ",ARRAYFORMULA(IFERROR( REGEXEXTRACT(SPLIT(A1," ",TRUE,TRUE), "https://example.com/(\S+)"),""))),"\s+"," ") You split the string at whitespaces, this is safe because URLs don't contain white space so you're definitely not breaking them up. This ...


Use REGEXMATCH : =countif(ArrayFormula(regexmatch(A1:A10,"^Bud Light$")),true) This formula counts the cells who match the regex ^Bud Light$ : Match exactly Bud Light You can add lower() and proper()to clean the range you want to test.

Top 50 recent answers are included