Vba2007 copy and paste information in different worksheets

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 10:01 PM GMT


Hi Damon! I am a beginner using VBA - I would like to find 2 specified words "MOA" and "HCA" in column A, starting on Row 4 of my work sheet titled "Student Tracking" and copy and paste it and the next 2 corresponding rows of information into column A, starting in Row 4 into another worksheet called "Practicum Tracking". Column A in "Student Tracking" has many, mnay different courses and the "MOA" and "HCA" are the only two that I need to pull onto the "Practicum Tracking" worksheet. I have been struggling through online tutorials and discovered yours and read and tried some of your copy paste methods you have advised to others, as I am a beginner, I am not sure how to tweak the code to fit my worksheets. The "MOA" and "HCA" can be copied into the "Practicum Tracking" worksheet in the order that they are input into the "Student Tracking" worksheet and I have created them all to be copied and pasted into the same column. Is it better for me to create all of the "MOA" in column A in the "Practicum Tracking" and then column B for "HOA"? Any assistance with this code would be gratefully appreciated!


I am sure that what you want can be easily done with a few lines of code. But your description of the problem is just a bit unclear to me. Hopefully your answer to this question will clarify things enough.

I am in particular confused by your reference to "copy and paste it and the next 2 corresponding rows of information into column A."

1. I'm not sure what a "corresponding" row is.

2. Did you mean to say "the next two columns"? (i.e., columns B and C)

3. If you really meant "the next two rows", then what should happen if the next two rows also contain the words "MOA" or "HCA"? Do you want them double and triple copied as your instructions would suggest?

4. Do you want the entire rows copied to the Practicum sheet? If just certain columns, which columns?

5. Is there data already in the Practicum worksheet? If so should the added data be inserted by moving the existing data down?

As you can see, getting the problem itself clearly defined is often where the hardest work lies. I will try to respond with a solution for you quickly when I receive your clarification.


©2024 eLuminary LLC. All rights reserved.