+ Reply to Thread
Results 1 to 5 of 5

How do I return characters from within brackets?

  1. #1
    Acastus
    Guest

    How do I return characters from within brackets?

    I have a spreadsheet where column "A" concatenates an product name with
    its product number. The product are within brackets, and,
    unfortunately, are of varying lengths. Herewith two examples:

    PRODUCT 123[R56011]
    PRODUCT 45678[5065]

    What I need to do is create a column "B" that only has the SKU number.
    This will allow me to use the VLOOKUP function to match data in other
    columns based on the unique SKU number with data in another sheet.
    Specifically, the column "B" data for the two examples above should
    look like:

    R56011
    5065

    I can't program on my own, but is there a command or function that will
    allow me to instruct excel to take only the characters between those
    brackets and put it in the adjacent cell in column B, regardless of the
    number of characters between the brackets?

    If anyone has advice, it'd be great!


  2. #2
    Ron Coderre
    Guest

    RE: How do I return characters from within brackets?

    Try something like this:

    For a value in A1

    B1: =MID(A1,SEARCH("[",A1)+1,SEARCH("]",A1)-SEARCH("[",A1)-1)

    Example:
    A1: PRODUCT 123[R56011]
    B1: returns R56011

    Is that something you can work with?
    ***********
    Regards,
    Ron

    XL2002, WinXP


    "Acastus" wrote:

    > I have a spreadsheet where column "A" concatenates an product name with
    > its product number. The product are within brackets, and,
    > unfortunately, are of varying lengths. Herewith two examples:
    >
    > PRODUCT 123[R56011]
    > PRODUCT 45678[5065]
    >
    > What I need to do is create a column "B" that only has the SKU number.
    > This will allow me to use the VLOOKUP function to match data in other
    > columns based on the unique SKU number with data in another sheet.
    > Specifically, the column "B" data for the two examples above should
    > look like:
    >
    > R56011
    > 5065
    >
    > I can't program on my own, but is there a command or function that will
    > allow me to instruct excel to take only the characters between those
    > brackets and put it in the adjacent cell in column B, regardless of the
    > number of characters between the brackets?
    >
    > If anyone has advice, it'd be great!
    >
    >


  3. #3
    Ron Rosenfeld
    Guest

    Re: How do I return characters from within brackets?

    On 29 Jul 2006 12:07:49 -0700, "Acastus" <[email protected]> wrote:

    >I have a spreadsheet where column "A" concatenates an product name with
    >its product number. The product are within brackets, and,
    >unfortunately, are of varying lengths. Herewith two examples:
    >
    >PRODUCT 123[R56011]
    >PRODUCT 45678[5065]
    >
    >What I need to do is create a column "B" that only has the SKU number.
    >This will allow me to use the VLOOKUP function to match data in other
    >columns based on the unique SKU number with data in another sheet.
    >Specifically, the column "B" data for the two examples above should
    >look like:
    >
    >R56011
    >5065
    >
    >I can't program on my own, but is there a command or function that will
    >allow me to instruct excel to take only the characters between those
    >brackets and put it in the adjacent cell in column B, regardless of the
    >number of characters between the brackets?
    >
    >If anyone has advice, it'd be great!


    If the only brackets are those surrounding the Product Number, then:

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

    should do it.
    --ron

  4. #4
    Acastus
    Guest

    Re: How do I return characters from within brackets?

    Bless you both! Yes, both work fine. Thanks again - it really saved me
    a HUGE amount of crap work!


  5. #5
    Ron Rosenfeld
    Guest

    Re: How do I return characters from within brackets?

    On 29 Jul 2006 14:24:33 -0700, "Acastus" <[email protected]> wrote:

    >Bless you both! Yes, both work fine. Thanks again - it really saved me
    >a HUGE amount of crap work!


    You're welcome. Thanks for the feedback.
    --ron

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1