Excel equivalent for TEXTBEFORE

Options
BrentOrr
edited September 2023 in Modeling

Need to pull text out of a string. Starting from the beginning but going varying # of characters. Last character will always be immediately before an underscore. So in Excel I could use the TEXTBEFORE function. No exact counterpart in Anaplan but wondering if someone has already solved this with a workaround?

Tagged:

Best Answer

  • gaurav
    edited September 2023 Answer ✓
    Options

    Hi @BrentOrr you can pull out text out of a string using LEFT, RIGHT,MID functions.

    You can try below steps:

    Step1: Create a number formatted line item(lets say Test) to find the number of characters before underscore e.g., FIND("_", The text formatted line item)

    Step2: Create a text formatted line item to pull the characters from left to the last character before underscore e.g., LEFT(The text formatted line item, Test - 1)

    The text formatted line item is your Original line item with the string.

    Cheers!