Marketing Analytics in Google Sheets
Luke Pajer
Digital Marketing Specialist
=REGEXMATCH(`string to test`, `regular expression`)
Filter tables
=FILTER(range, REGEXMATCH(string to test, regular expression))
Aggregate by categories
=SUM(FILTER(range, REGEXMATCH(string to test, regular expression)))
=AVERAGE(FILTER(range, REGEXMATCH(string to test, regular expression)))
Used to replace a portion of a string
=REGEXREPLACE(string, regular expression, replacement string)
To replace only a certain categorical string
=IF(REGEXMATCH(test, regex), REGEXREPLACE(string, regex, replacement string), if False)
Used to extract portions of strings
=REGEXEXTRACT(`string`, `regular expression`)
To extract only a certain categorical string
=IF(REGEXMATCH(test, regex), REGEXEXTRACT(string, regex), if False)
Marketing Analytics in Google Sheets