+ Reply to Thread
Results 1 to 8 of 8

Extract Text From a large String

  1. #1
    Registered User
    Join Date
    02-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    32

    Question Extract Text From a large String

    Please Login or Register  to view this content.

    hello guys please help me out i want to extract some text from this "String" can anyone help me out. I want
    Please Login or Register  to view this content.
    All in different columns can anyone help me out?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Text From a large String

    You can split that string into an array, then search for each text string in the array elements, take the value in the next field to get the prices, build up your new string. This is a VBA question, right? Not formulas in a cell?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Text From a large String

    As a VBA exercise, assuming the source of the text is cell A4, this macro shows you how a way to cycle through the elements and build up that string:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Extract Text From a large String

    Thanks for the reply mate but i want those values in another cell not in a msg box can you help me out?

    Quote Originally Posted by JBeaucaire View Post
    As a VBA exercise, assuming the source of the text is cell A4, this macro shows you how a way to cycle through the elements and build up that string:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Text From a large String

    yes, I've helped a great deal. Now that you have a "Buf" filled with your code, use that to put it in a cell of your choosing instead of a messagebox. Let's see you try to do some of it now, you're 95% of the way there, yes?

  6. #6
    Registered User
    Join Date
    02-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Extract Text From a large String

    Quote Originally Posted by JBeaucaire View Post
    yes, I've helped a great deal. Now that you have a "Buf" filled with your code, use that to put it in a cell of your choosing instead of a messagebox. Let's see you try to do some of it now, you're 95% of the way there, yes?
    hey mate i'm a newbie in excel tried many functions in place of Msgbox but didn't work out kindly help me please ...

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Extract Text From a large String

    Try
    Please Login or Register  to view this content.
    Last edited by jindon; 03-07-2013 at 05:28 AM.

  8. #8
    Registered User
    Join Date
    02-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Extract Text From a large String

    Thanks a lot guys .. this forum is the best .. thanks a ton

    Quote Originally Posted by jindon View Post
    Try
    Please Login or Register  to view this content.

+ 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