Have you ever needed to extract text from between a set of parentheses in Excel? Or extract a URL from between a pair of hash tags? Or do anything similar. Consider the example below. I need to extract the Production Code (the bit in brackets) from the ProductionID.

One option is to create a long-winded formula:


Last week I was using Numbers, the spreadsheet app that’s part of Apple’s iWork Suite. I happened to notice that It also includes a TEXTBETWEEN function which, as of today, Excel doesn’t have. However, thanks to the magic of Power Query you can do it in a couple of minutes at most!

This video covers 4 different scenarios including starting from the end of the string, starting with the Nth (2nd, 3rd etc) occurrence and extracting from between multi-character strings.