+ Reply to Thread
Results 1 to 4 of 4

Help modify the VB Code to copy data between 2 text string

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Help modify the VB Code to copy data between 2 text string

    Hello:

    I need to modify the below code so that it copies all data between String1 and String2 and then
    copy all data between String3 and String4 from "Startsheet" to "Result" Sheet.

    Please refer to attahced sheet.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Help modify the VB Code to copy data between 2 text string


    Hi,

    please attach a workbook with a result sheet with data !

    What's the issue with the code ? Awful, I agree ! But what' the matter ?

    See the Find method …

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Help modify the VB Code to copy data between 2 text string

    Hello:

    I have attached sheet earlier.
    Please open and have a look.
    The code would work fine, if i change the cell A7 to "Z1/Groups" instead of what is currently "Z1/Groups /12-22-2013/01:09".
    So basically the code needs to find the partial string "Z1/Groups" and copy data until 1st occurrence of "REPORT END"
    Then code needs to copy data from "Z1/Financial" to 2nd occurrence of "REPORT END".
    Currently it would copy until the last occurrence of "REPORT END".

    Please help and let me know.

    Thank You

    Riz Momin

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: Help modify the VB Code to copy data between 2 text string


    As I already had open the file and 'cause there is nothing in result sheet (‼),
    I just advise you to see the Left function to compare the beginning of a cell
    but, if there is a lot of lines, faster is to use the Find method …

+ 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] Modify code to search first matching string from right to left.
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-10-2012, 12:47 AM
  2. [SOLVED] Modify code to transpose a stack of data to rows on to delimit on text hone number field
    By coachtim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2012, 02:52 PM
  3. How to modify the following code to copy comments containing specific text
    By sureng19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2010, 12:15 PM
  4. Modify Code to Copy
    By shudder in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2009, 07:08 AM
  5. Modify Code to copy only value not formulas
    By xned in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-08-2009, 11:21 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