+ Reply to Thread
Results 1 to 6 of 6

Extract part of the information in a single cell?

  1. #1
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Kinsale, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    129

    Extract part of the information in a single cell?

    Dear Forum,
    Was hoping someone could tell me if the following is something that can be handled with a formula, VBA or not practical with Excel.

    I have a worksheet that is an export from a 3rd party program that I want to extract information from. My initial problem is that there is a single cell with multiple 'parts' of data. And unfortunilty I can't get the 'Text to Columns' to help me out as the section that I'm looking to extract is enclosed with parentheses, but also are other sections that are not to be extracted, so using the parentheses wouldn't seem to work.

    The only 'system' I can see is that the item code (which is the information I'm looking to separate), is always the last set of data enclosed within parentheses. Although it is not a set of number of spaces (depends on the item code lenght).

    Please see attached file for an example of what I'm looking to do.

    Feasable or SOL? Any insight or advise would be greatly appreaciated.
    Attached Files Attached Files
    Last edited by Cidona; 11-20-2010 at 03:20 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Extract part of the information in a single cell?

    You can nest FIND functions to find the n-th instance of a character. So, if there are always 3 sets of brackets (bear with me, will improve this!), then the following will find the third open-brackets
    Please Login or Register  to view this content.
    If there might be more than three, just nest as many as you might need.

    If there are less than the number you've allowed for, you want the formula to ignore the iteration that generates it, so use IFERROR as per the attached.

    Do something similar with LEFT to retrieve the other part.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Extract part of the information in a single cell?

    Thinking about it, something simpler might do. Does this bracket always start with (Item Code? If so,
    Please Login or Register  to view this content.
    Will give you the location where it starts, and
    Please Login or Register  to view this content.
    will do the job.

  4. #4
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Kinsale, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Extract part of the information in a single cell?

    Hey outofthehat, Thank you for the reply!
    Your 2nd suggestion is the pathway. The 1st suggestion wouldn't work as it depends on the particular part as to whether there are other items with parentheses within the cell or not. However, the item code which I'm looking to extract is always the last 'thing' within parentheses and as you picked up, always starts with (Item...
    So your 2nd suggestion is just the ticket for populating Column D with the item code separated from the rest of the text (Very very cool!!).
    Hate to push my luck here but since you are familar with the intent here and seem to have these text extraction formulas figured out...how would one go about populating say cell A12 with the text without the item code? (as shown on in A12 of the worksheet on the OP)?
    Thanks again for your help. Nice kung-fu

  5. #5
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Kinsale, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    129

    Thumbs up Re: Extract part of the information in a single cell?

    LOL. Swapped 'Right' for 'Left'. Good to go. Thanks again!

  6. #6
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Kinsale, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Extract part of the information in a single cell?

    Well actually just swapping left for right didn't produce enough characters for the full description, but with manupulation of the LEN function am able to get the desired results. Thanks again.

+ 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