+ Reply to Thread
Results 1 to 7 of 7

Copy Text Inside of Text String

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Copy Text Inside of Text String

    Okay, I have one column full of Item #s and Descriptions. I have another column that I want JUST the Item# in it.

    For example:

    Column 1:
    Gyroscope REF#1234 Bike Thing

    Column 2 Should Be:
    1234

    Column 1:
    BallWall Bikes Ret# 12456 Helmet Thing

    Column 2S hould Be:
    12456

    I don't know how to do this (I do know how to do VBA mildly, and I am pretty good with formulas). I also have a database of every Item# that could be in that cell.

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Copy Text Inside of Text String

    Are the item numbers the only part of the string that could be a number?

    Also is a # always before the number?
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Copy Text Inside of Text String

    Well, assuming it always has a "#" or "# " with a space before the number, and a space after the number...
    This will do the trick

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Copy Text Inside of Text String

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I can use this, except the problem is that I need it to be able to search a range or database of potential words and then make column 2 equal to any word it finds instead of a spcified word.

    To answer your question, the item # might be a word or number, or combination of both. It might not be the only word or #. A # is usually before the item#...Example: ITEM# 1221 or ITEM#1221, etc.

  5. #5
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Copy Text Inside of Text String

    That formula works for some of it...but it isn't always in that format. I need a formula that will search a list of words for a match in the desired cell.

    If there is a match, the result will be that word.

  6. #6
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Copy Text Inside of Text String

    It works well enough.

  7. #7
    Registered User
    Join Date
    07-28-2014
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    3

    Re: Copy Text Inside of Text String

    Hi Guys, new to the forum but a long time user of the formulas published here. Having a trouble at this formula. So far the formula work to a certain level...

    I'm working with a data as below.

    22.04.2014 08:01:30 John Doe
    Report number:OC-TPI/KLM-SA/AJU-123
    Title: Report For Pancake Taste
    Tasting date: 08/09/2013

    Result: Delicious Pancake!.


    My end goal is to extract "OC-TPI/KLM-SA/AJU-123"

    I have successfully do that using this code.
    Please Login or Register  to view this content.
    But my database not all the "Report number:" is using the word number, some will look like this "Report No.:" So I modified the code to look for "OC-" which is the beginning of the report no name. as below:
    Please Login or Register  to view this content.
    But the problem now, it output "TPI/KLM-SA/AJU-123" missing the "OC-".

    Try to tweak the code but I'm still stuck.

    Note: the report number always start with "OC-" and always ended with char(10)[Alt+Enter]

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] need to use a text string inside range - errors
    By fredderf81 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2013, 03:29 PM
  2. copy only fonts(text color) from one string of text to another string of text
    By JMJ123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-06-2013, 04:22 AM
  3. Find/Replace inside text string using a formula
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-21-2013, 04:24 PM
  4. Search text inside a string
    By pimar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2006, 01:01 PM

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