none
EXTRACT STRING FROM BETWEEN BRACKETS? RRS feed

  • Question

  • Hi all:

    I have cells filled with data like the following

    [MyField_Field] [uniqueidentifier] NOT NULL,

    What I want to do is extract MyField_Field from between the first set of brackets ONLY.

    Result:  MyField_Field in another column.

    Thanks!


    A. Wolf

    Monday, August 10, 2015 5:16 PM

Answers

  • For that string in cell A2:

    =IFERROR(TRIM(MID(SUBSTITUTE(SUBSTITUTE($A2, "[", REPT(" ", LEN($A2)), 1), "]", REPT(" ", LEN($A2)), 1), LEN($A2), LEN($A2))), "Not found")

    • Proposed as answer by André Santo Monday, August 10, 2015 6:26 PM
    • Marked as answer by amywolfie Monday, August 10, 2015 6:35 PM
    Monday, August 10, 2015 5:42 PM