Extract variable lenght text from Excel cell

Hi reader,

Sometimes we have a list of raw data from which we want to extract only a specific string, as the example bellow.


On this table, the aim is to extract the link from each cell (always starts after " href=' " and ends before " ' ". Therefore, we should use the function "=LEFT(MID(OriginalText;FIND(StartAfter;OriginalText)+LEN(StartAfter);1000);FIND(StopBefore;MID(OriginalText;FIND(StartAfter;OriginalText)+LEN(StartAfter);1000))-LEN(StopBefore))", where:
  • OriginalText: Cell from which you want to extract the information (e.g. cell A2)
  • StartAfter: Text that specifies the start of the information to extract (e.g. cell B2,)
  • StopBefore: Text that specifies the end of the information to extract (e.g. cell C2)
Hope it makes your spreadsheets easier.

Comments