locked
retrieve a value in parenthesis RRS feed

  • Question

  • Hi,

    In a calculated column, I would retrieve the fields in parenthesis. ex: lab (cisco) -> cisco

    I used to this script: (i used to ";" as separator)

    =MID([easyvista-ezv-serveurs-application];FIND("(";[easyvista-ezv-serveurs-application])+1;FIND(")";[easyvista-ezv-serveurs-application])-FIND("(";[easyvista-ezv-serveurs-application]))

    My column:

    Thank you for your help

    Monday, May 5, 2014 5:05 PM

Answers

  • how about this one: (Assuming your column is called [Name])

    =SUBSTITUTE(MID([Name]; FIND("("; [Name])+1; 255);")";"")

    hth,
    gerhard


    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

    • Proposed as answer by Elvis Long Wednesday, May 7, 2014 2:56 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Monday, May 5, 2014 7:17 PM
    Answerer
  • You can use replace too

    =SUBSTITUTE(REPLACE([easyvista-ezv-serveurs-application],1,FIND("(",[easyvista-ezv-serveurs-application]),""),")","")


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Proposed as answer by Elvis Long Wednesday, May 7, 2014 2:56 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Monday, May 5, 2014 7:39 PM
  • Although your sample doesn't show this need, if you ever need to retrieve the value from parenthesis and it is located anywhere in the text string and not just the end, you might try something like this:

    =MID(
       [Name], 
       FIND(
          "(", 
          [Name]
       ) + 1, 
       FIND(
          ")", 
          [Name]
       ) - 
       FIND(
          "(", 
          [Name]
       ) - 1
    )

    • Proposed as answer by Michael Amadi Friday, May 16, 2014 5:24 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Thursday, May 15, 2014 8:28 PM
    Answerer

All replies

  • how about this one: (Assuming your column is called [Name])

    =SUBSTITUTE(MID([Name]; FIND("("; [Name])+1; 255);")";"")

    hth,
    gerhard


    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

    • Proposed as answer by Elvis Long Wednesday, May 7, 2014 2:56 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Monday, May 5, 2014 7:17 PM
    Answerer
  • You can use replace too

    =SUBSTITUTE(REPLACE([easyvista-ezv-serveurs-application],1,FIND("(",[easyvista-ezv-serveurs-application]),""),")","")


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Proposed as answer by Elvis Long Wednesday, May 7, 2014 2:56 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Monday, May 5, 2014 7:39 PM
  • Although your sample doesn't show this need, if you ever need to retrieve the value from parenthesis and it is located anywhere in the text string and not just the end, you might try something like this:

    =MID(
       [Name], 
       FIND(
          "(", 
          [Name]
       ) + 1, 
       FIND(
          ")", 
          [Name]
       ) - 
       FIND(
          "(", 
          [Name]
       ) - 1
    )

    • Proposed as answer by Michael Amadi Friday, May 16, 2014 5:24 AM
    • Marked as answer by Elvis Long Monday, May 19, 2014 2:15 AM
    Thursday, May 15, 2014 8:28 PM
    Answerer