• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find Text Within A Row, Then Copy Information Below That Cell To Second Worksheet

Kevin S

New Member
I’ve recently taken over an Excel workbook that uses VBA to find, copy, and paste information between two workbooks. I’m relatively new to Excel VBA coding, so I’m looking for any help that will reduce the vast number of lines, over 300, of redundant coding. I will be unable to provide the actual coding as it includes sensitive information and would take a lot of time to make the coding genetic. Here is what I want to accomplish:
  • Find each instance of text within a row range
  • Once I find a cell with text, I want to copy the cell and a 5x5 block of information, which is two rows below that cell, to another workbook
  • The copied information needs to be appended to the last used row in the second worksheet

I’ve searched the web for ideas on how to accomplish this. I can find snippets of coding that can do some parts, but I don’t know how to consolidate and organize the coding into a single process.
The attached file is a very raw example of the type of data I’m using. The three blocks of values on the source tab need to be pasted into the destination worksheet. Currently, in the destination tab is the format/result required.

Any help is greatly appreciated.
 

Attachments

  • Example 1.xlsx
    10.3 KB · Views: 1
Kevin S
Few questions:
# Find each instance of text within a row range
> Do You mean 2nd rows values? ... only from one row, now based row two?
# Once I find a cell with text, I want to copy the cell and a 5x5 block of information, which is two rows below that cell, to another workbook
> Your sample results shows range from next row
# The attached file is a very raw example of the type of data I’m using.
> Is real source's layout as Your sample's?
>> It should be as realistic as possible.
 
cross posted
 
Kevin S
As You've read from Forum Rules as well as from those other Forums Rules (basic same with Cross-Posting).
Please reread it again. Those rules are for You too.
  • Cross-Posting. Generally, it is considered poor practice to cross post. That is to post the same question on several forums in the hope of getting a response quicker.
  • If you do cross-post, please put that in your post.
  • Also if you have cross-posted and get an Solution elsewhere, have the courtesy of posting the Solution here so other readers can learn from the answer also, as well as stopping people wasting their time on your answered question.
 
Back
Top