Hi,
Made a big macro to collect cell data based on finding a text string, moving cell position down 3, across 1, and then selecting and copying all the rows with data in that column to another worksheet. Worked great until the next month when the new original data had the text strings in different columns. It still finds the text string, but pulls the wrong range of data to copy.
I've been seeing posts about variable ranges using dim, but I don't understand how to code it.
Here's and example of what I want to do.
In sheet named "Original"
Find the text string "REG"
Move down 3 and right 1
Select/copy the next 150 rows in the column
Paste that selection to Column G, row 5 in sheet named "Select"
Add column header text "REG" to Column G, row 3
If I can get that to work, I can copy the code for the other 18 text strings.
Any help is greatly appreciated. Thanks.
Made a big macro to collect cell data based on finding a text string, moving cell position down 3, across 1, and then selecting and copying all the rows with data in that column to another worksheet. Worked great until the next month when the new original data had the text strings in different columns. It still finds the text string, but pulls the wrong range of data to copy.
I've been seeing posts about variable ranges using dim, but I don't understand how to code it.
Here's and example of what I want to do.
In sheet named "Original"
Find the text string "REG"
Move down 3 and right 1
Select/copy the next 150 rows in the column
Paste that selection to Column G, row 5 in sheet named "Select"
Add column header text "REG" to Column G, row 3
If I can get that to work, I can copy the code for the other 18 text strings.
Any help is greatly appreciated. Thanks.