Forum Discussion

Rmcclung's avatar
Rmcclung
Copper Contributor
Nov 01, 2023
Solved

How can I extract a variable value in a string of inconsistent text?

Hey Everyone,   I need to extract a string of characters in order to perform an XLOOKUP function. See attached spreadsheet. Example data I need to extract from can be seen in Column 1. The value I ...
  • HansVogelaar's avatar
    Nov 01, 2023

    Rmcclung 

     

    =LET(position1, FIND("AP-",[@[Column 1]]), position2a, IFERROR(FIND(" ", [@[Column 1]], position1), 1000), position2b, IFERROR(FIND(CHAR(10), [@[Column 1]], position1), 1000), position2c, LEN([@[Column 1]])+1, position2, MIN(position2a, position2b, position2c), MID([@[Column 1]], position1, position2-position1))

Resources