+ Reply to Thread
Results 1 to 2 of 2

macro to locate locate text string and copy/paste offset range

  1. #1
    Registered User
    Join Date
    12-16-2014
    Location
    Colorado, United States
    MS-Off Ver
    windows 7
    Posts
    1

    macro to locate locate text string and copy/paste offset range

    Hello - fairly new to VBA code. I have a macro that opens multiple PDF files, converts to excel, and merges into one excel file. i then need to search for a particular text string, copy the entire row containing that string, plus the 11 rows below it, and paste into a new worksheet. I need to perform this task until I've captured all instances of the text string. The problem is that the text string does not always appear in the same column and is not a set number of rows from the last instance. I have the simple code to find the first instance, but struggling to loop through the remaining cells. i tried to use "findnext" but can't figure out the syntax. Can someone help? thanks

    Please Login or Register  to view this content.
    Last edited by alansidman; 12-16-2014 at 08:45 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: macro to locate locate text string and copy/paste offset range

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Copy Values to separate sheet, locate value in list and paste 6 cells to the left
    By drknot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2014, 10:16 AM
  2. Using macro to locate certain text, then copy the cell below text into another sheet
    By BobertSama in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 01:32 PM
  3. [SOLVED] Macro: Locate specific text within supplied range
    By darrenkaye in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2012, 01:03 PM
  4. [SOLVED] Macro to locate/modify text
    By Nate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2006, 01:55 PM
  5. [SOLVED] Locate and count the recurrences of a text string
    By Trish2 in forum Excel General
    Replies: 1
    Last Post: 03-08-2006, 11:10 AM

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