none
VBA - Search for two words in column A and copy all the rows in between RRS feed

  • Question

  • Hi

    I need to find two specific words on a sheet in column A and then copy all the rows in between to a new book.

    On the new book i need to find a named row and then paste the selected rows below this named row.

    Can someone please help

    thanks

    Tuesday, March 27, 2018 10:44 AM

All replies

  • Hello,

    Since this is VBA and not VB.NET I'm moving this to the Excel for developer forum.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, March 27, 2018 11:02 AM
  • Keep the macro recorder on. Do the job manually. Paste the generated code here.

    [Assuming you know how to use macro recorder]


    Best Regards,
    Asadulla Javed,
    Jadavpore & Asansol

    Tuesday, March 27, 2018 11:29 AM
    Answerer
  • Hi 

    I tried that but whet happens is it just selects the rows as row numbers not showing how to vary the number of rows between the selected words.

    Tuesday, March 27, 2018 12:00 PM
  • Correct. We need to adjust the generated code. Start recording using FIND feature of excel.

    Best Regards,
    Asadulla Javed,
    Jadavpore & Asansol

    Tuesday, March 27, 2018 1:41 PM
    Answerer
  • Hello LynnSCH,

    Do you need copy the entire rows or just data in column A?

    What do you mean named row? How could we find the named row?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 28, 2018 6:38 AM