+ Reply to Thread
Results 1 to 7 of 7

Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    I have looked all over this board for the solution and found numerous things that *almost* worked, but none did. So frustrated right now that I decided to just post and see if someone can help me out.

    I'm not a programmer, but understand the concepts from Test Automation, javascript, etc...

    I have such a simple problem.

    I have an Excel sheet with text content ONLY in ROW A -- about 400 rows.

    I need to search each row for three phrases: "[info] Executing: |echo", "[info] echo: true" and "[info] echo: true".

    If any row is a match, I want that row copied and pasted into Sheet2, one after the other.

    That's it. So conceptually easy, but I'm feeling like a big moron that I can't figure it out.

    Sample excel file is attached. THANKS!Results_File.xlsx

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    hi dmlovic, welcome to ExcelForum, VB option to make it, please check attachment, press "Run"
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-15-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    A million times "thank you."

    You have just taken a weight off of me as I go home for the evening.

    David

  4. #4
    Registered User
    Join Date
    05-15-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    I just realized that I messed up what I originally posted. The third condition is supposed to be "[info] echo: false" so that there's 3 conditions. Ugh. I tried doing what seemed to make sense, which is:

    With .Range("a1:a" & lrow)

    .AutoFilter 1, "[info] Executing: |echo*", xlOr, "[info] echo: true", xlOr, "[info] echo: false"
    .Offset(1).Copy Sheets.Add(after:=Sheets(Sheets.Count)).Range("a1")
    .AutoFilter

    End With

    But obviously, that's not the answer. Can you help?

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    please check attachment, press Run
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-15-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    Works perfectly.

    If you have a PayPal address, I'll send you $5.

    Thanks.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row

    thanks is enough

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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